Thanks, I'll try.
Multiple icons/buttons in a cell
- Enrico Maria Giordano
- Posts: 9054
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Multiple icons/buttons in a cell
This is the RC file:
Code: Select all | Expand
MIO_PNG RCDATA "S_1.png"Re: Multiple icons/buttons in a cell
Natter, see if this helps: Look at NATERPNG.RC, include the .PNG files you want to use, and convert them to .RES FILES. Incorporate the .RES FILES into your project and call them wherever you need them. See the attached demo. If you have any questions, ask.
Natter, mira si esto te sirve: consulta NATERPNG.RC, incluye los archivos .PNG que quieras usar y conviértelos a formato .RES. Incorpora los archivos .RES a tu proyecto y úsalos donde los necesites. Consulta la demostración adjunta. Si tienes alguna duda, pregunta.
Tests with FWH26.03, xHARBOUR, and BCC77 worked perfectly.
Las pruebas realizadas con FWH26.03, xHARBOUR y BCC77 funcionaron a la perfección
Download complete,
https://mega.nz/file/tMkGGAYD#HAfXMxHyn ... NlmcwD_1E0
Regards, saludos.
Re: Multiple icons/buttons in a cell
There are 3 icons (48x48) in the xBrowse cell. Is it possible to change the cursor type when hovering over any of these icons?
Re: Multiple icons/buttons in a cell
Natter wrote: Thu May 14, 2026 7:36 amThere are 3 icons (48x48) in the xBrowse cell. Is it possible to change the cursor type when hovering over any of these icons?
Something like that?
viewtopic.php?p=282669&hilit=oCol%3AbMMoved#p282669
Code: Select all | Expand
// Exemplo de código para xBrowse com ícones 48x48
oCol := oBrw:AddCol()
oCol:bStrData := { || "" }
oCol:nDataStrAlign := AL_CENTER
oCol:AddBitmap( { "icon1.bmp", "icon2.bmp", "icon3.bmp" } ) // Carrega os 3 ícones
oCol:nWidth := 150 // Espaço suficiente para 3 ícones 48x48 lado a lado
// Evento ao mover o mouse dentro da célula
oCol:bMMoved := { | nRow, nCol, nFlags | ;
If( nCol > 10 .and. nCol < 50, ; // Ajuste as coordenadas X de cada ícone
oBrw:oCursor := oCursorHand(), ; // Define a mãozinha
oBrw:oCursor := nil ) ; // Volta ao cursor padrão
}
Code: Select all | Expand
#include "FiveWin.ch"
#include "xbrowse.ch"
Function Main()
local oWnd, oBrw, oCol
local oHand, oArrow
DEFINE CURSOR oHand HAND
DEFINE CURSOR oArrow ARROW
// ... setup browse and data ...
oBrw:bMMoved := { |nRow, nCol, nKeyFlags|
CheckIconHover(oBrw, nRow, nCol, oHand, oArrow)
}
// ... activate browse ...
return nil
Function CheckIconHover(oBrw, nRow, nCol, oHand, oArrow)
local nCellRow, nCellCol
local nIcon1X, nIcon2X, nIcon3X
local nIconY := 10 // Example vertical position in cell
// Determine if we are on the specific column with icons
// Get mouse position relative to the CELL
// This requires calculating where the icons are drawn:
// ... (Icon location calculation logic) ...
// Example condition (if mouse is over icon 1, 2, or 3 area)
if IsMouseOverIcon(oBrw, nRow, nCol)
oBrw:oCursor := oHand
else
oBrw:oCursor := oArrow
endif
return nil
Regards, saludos.