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:
00174921
Views:
29
>>>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

Michael, you might want to check out my article here in the files section (Ideas For a Better Grid) for ideas on how to improve this design.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform