Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Help Subclassing a Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00174843
Message ID:
00174921
Vues:
30
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform