Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Help Subclassing a Grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00174843
Message ID:
00174884
Views:
26
>>Instead of having a parent with "X" number of colunns pre-populated with redundant event code, is there a way to cause new text fields added in each column to be a subclass of a separate text field class, one containing all the event code needed, just once?
>
>Try creating a textbox class (ex: MyGridTextBox) in the same classlib as your subclassed grid. Put the necessary generic code in this object. Then when building your grid columns out, AddObject( "newText", "myGridTextBox" ) to each column. Then, as necessary with either explicit column.currentcontrol = "newtext", or by using Grid.SetAll() method, make all current controls = the custom textbox added...

That works! Thanks a LOT!

Michael Reynolds
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform