Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working out relative xy coords within a control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01340698
Message ID:
01341072
Vues:
15
That's great, thanks Sergey!

>
>* MouseDown
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
>* Top and Left of the button relative to the form
>* If button is placed directly on the form, this step is not necessary
>lnTop  = OBJTOCLIENT(This, 1)
>lnLeft = OBJTOCLIENT(This, 2)
>
>* X and Y coordinates of the mouse relative to the button
>lnX = nXCoord - lnLeft + 1
>lnY = nYCoord - lnTop + 1
>* ...
>
>
>>
>>I have a command button with a little picture imgae (a tick) when action has been taken, otherwise it's displayed without the image.
>>
>>I know I could re-design the whole control to be in a container, but I was hoping I could detect when the mousedown event (part of the click) was over the little image rather than over the caption part of the button.
>>
>>I have so far been messing about with objtoclient(), the x and y coords in the mousedown without much success.
>>
Mathias Banda

Time is longer than a rope.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform