Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Showing custom MouseIcon is Grid Header
Hello,
i want to show a custom MouseIcon when the mouse is over a header in a grid with this code in the header MouseMove event:
FUNCTION MouseMove
LPARAMETERS nButton, nShift, nXCoord, nYCoord
LOCAL lnWhere, lnRelRow, lnRelCol, lnView
THIS.Parent.Parent.GridHitTest(nXCoord,nYCoord,@lnWhere,@lnRelRow,@lnRelCol,@lnView)
IF lnWhere = 2 && Show sizing cursor if in sizing area (between columns)
RETURN
ENDIF
DO CASE
CASE EMPTY(THIS.cRightTag) AND EMPTY(THIS.cLeftTag)
THIS.Parent.Parent.MousePointer = 14
CASE THIS.nCurrentOrder = IDLEFTSORT
IF THIS.nLeftDirection = IDSORTASC
THIS.Parent.Parent.MouseIcon = 'dnArrow.cur'
ELSE
THIS.Parent.Parent.MouseIcon = 'upArrow.cur'
ENDIF
THIS.Parent.Parent.MousePointer = 99
CASE THIS.nCurrentOrder = IDRIGHTSORT
IF THIS.nRightDirection = IDSORTASC
THIS.Parent.Parent.MouseIcon = 'dnArrow.cur'
ELSE
THIS.Parent.Parent.MouseIcon = 'upArrow.cur'
ENDIF
THIS.Parent.Parent.MousePointer = 99
ENDCASE
ENDFUNC
cRightTag and cLeftTag are header custom properties that hold the desired index Tag to order on for Right-Left Click..
if both are not set the header shows the normal arrow cursor, which works fine ... (first CASE statement) ..
the problem is that the custom "*.cur" files don't display correctly ..
instead of the self painted arrow's a entirely black rectangle is drawn
anyone got an explanation for this .. or has run into the same problem?
Regards
Christian
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement