Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Showing custom MouseIcon is Grid Header
Message
De
23/12/2003 07:18:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Showing custom MouseIcon is Grid Header
Divers
Thread ID:
00861546
Message ID:
00861546
Vues:
57
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
Fil
Voir

Click here to load this message in the networking platform