Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set code in the Method or Events in Runtime?
Message
From
26/08/2013 08:18:54
 
 
To
24/08/2013 00:44:09
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2008 Server
Database:
Oracle
Application:
Desktop
Miscellaneous
Thread ID:
01581252
Message ID:
01581410
Views:
53
>Hi,
>
>I want to set some coding in the Grid Header Click event in runtime.
>How to do it ?
>
>Please advise.
>
>Thanks.
>Derek

Best approach would be using BINDEVENT() in combination with AEVENTS():
BINDEVENT(THISFORM.Grid.Column1.Header1,"Click",THISFORM,"OnGridHeaderClick")
In THISFORM.OnGridHeaderClick(), using aEvents() to get a reference to the clicked header:
AEVENTS(la,0)
LOCAL loHeader
loHeader = la[1]
loHeader.Caption = "Clicked"

LOCAL loColumn
loColumn = loHeader.Parent
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform