Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add (programmatically) code in header click event
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01239437
Message ID:
01239445
Views:
19
>>I need to add programmatically columns in a grid, also add for each column some code in its header click event. How to do that?
>BINDEVENT() and the in the method check the column:
>
>
>thisform.Grid1.ColumnsCount = thisform.Grid1.ColumnsCount+1
>WITH thisform.Grid1.Columns(thisform.Grid1.ColumnsCount)
>     .Name = [Something]
>     ....
>     BINDEVENT(.Header1,[Click], thisform,[ClickHeader])
>ENDWITH
>
>
>* ClickHeader Method
>
>AEVENTS(laEvent,0)
>IF laEvent[1,1].Parent.Name == [Something] && That is our column
>    WAIT WINDOW {Hurray]
>ENDIF
>
Beat you, since I didn't have to type :)

BTW, did you check your PM recently?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform