Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add CurrentControl
Message
From
29/12/1998 05:44:23
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
28/12/1998 12:33:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00170822
Message ID:
00171080
Views:
31
>I'd like to add more controls to each column of grids on the fly. I can create a name for the new control but what about a class? I'd like to have same class as a default current control. I am not sure if it's possible. If it is then what should I put into this exp.:
>ThisFrom.grdGrid.Column1.AddObject('newcontrolname', )
>Thanks Mark

You could either :-
1) EVALUATE the class of the default control
2) Loop through the columns Controls collection (array) until you find the one with the same name as the default, then grab its Class property.

e.g.
1)
lcClass = EVALUATE( "ThisForm.grdGrid.Column1." +
ThisForm.grdGrid.Column1.CurrentControl + ".class")

Then

ThisForm.grdGrid.Column1.AddObject('newcontrolname', lcClass)
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform