Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Implementing Right-Click in Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00895845
Message ID:
00895906
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
Hi Jaime,

You can implement BINDTOEVENTS() in your grid class.
PROCEDURE Bind_RightClick() && New method
LOCAL lii,liy,loCol,loObj
FOR lii=1 TO m.This.ColumnCount
    loCol=m.This.Columns(m.lii)
    FOR liy=1 TO m.loCol.ControlCount
        loObj=m.loCol.Columns(m.liy)
        =BINDEVENTS(m.loObj,"RightClick",m.This,"RightClick",1)
    NEXT
NEXT

PROCEDURE Destroy()
LOCAL lii,liy,loCol,loObj
FOR lii=1 TO m.This.ColumnCount
    loCol=m.This.Columns(m.lii)
    FOR liy=1 TO m.loCol.ControlCount
        loObj=m.loCol.Columns(m.liy)
        =UNBINDEVENTS(m.loObj,"RightClick",m.This,"RightClick")
    NEXT
NEXT
MartinJ

>Hi Martin
>Thanks for your help.
>I thought of BindEvents(), but is there an easy way to accomplish what i want, with BindEvents(), without having to enter some code in every column/textbox? The reason i ask is that i have a grid with some 40+ columns...
>Jaime
>
>>Hi Jaime,
>>
>>Under VFP 5.0/6.0/7.0 you can use command ON KEY LABEL RIGHTMOUSE... or create grid programmaticaly with own classes for column and controls for columns. Under VFP 8.0 you can use BINDEVENTS() for bindings method on objectes.
>>
>>MartinJ
>>
>>>Hi All
>>>I have a popup menu attached to the Right-Click event of a grid. Since the events that fire are in the textboxes inside the grid columns, i added in every textbox's right-click event : This.Parent.Parent.RightClick().
>>>Is there a more elegant way to achieve this? I am using VFP8 SP1
>>>
>>>Thanks
>>>Jaime
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform