Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Clicking on Column Header function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00946470
Message ID:
00946493
Vues:
36
>Using BindEvent() to bind your header's click event is a piece of cake. Here's what you need to do. In your grid class's Init:
>
>FOR EACH oColumn IN This.Columns
>   FOR EACH oHeader IN oColumn.Controls
>      IF UPPER(oHeader.BaseClass) = "HEADER"
>         BINDEVENT(oHeader,"Click",This,"HeaderClick")
>      ENDIF
>   ENDFOR
>ENDFOR
>
>Then you create a method in your grid class called HeaderClick that runs the code you need. If you need to access any properties of the header that caused the click to be fired from within the HeaderClick method, you use the AEVENTS method:
>
>AEVENTS[aCurEvent,0]
>loCalledBy = aCurEvent[1]
>
>loCalledBy then has an object reference to the header that the user clicked.

Thank you very much for the code. I hope the customer approves converting this app to VFP 8, it would help me learn a lot of new things, BindEvent() being one of them.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform