Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code to existing grid textboxes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01241212
Message ID:
01241245
Vues:
31
>>We have added a property and some code to all of our text boxes and would like to do the same with the text boxes in our grids. The text boxes were easy, just make the changes to the base class and over a thousand text boxes in hundreds of forms were changed.
>>
>>We would like to do the same in all our grids but I sure of the best way to do it. I can add the property to each column textbox using addproperty in a loop in the grid init but how do I add code to each text box without editing every column of every grid?
>>
>>I thought about writing a builder (more like a chainsaw prg) that would hack through every grid in every .scx and add code to the text box click events but I'm not sure how to focus on just the column textboxes though I have ideas.
>>
>>Is there a way to automate changing out the default text box and replacing it with the desired one from my class?
>>
>>Mostly, at this point, I'm looking for some suggestions, advice, ideas.
>>Thanks.
>
>John,
>better use your own TextBox class as a grid column control.
>That has some disadvatages, you can't just set
>
>thisform.Gridxxx.ColumnCount = yyyy
>thisform.Gridxxx.RecordSource = [SomeAlias]
>thisform.Gridxxx.Refresh()
>
>but all other goodies are here :-).

Borislav,
I agree that using my text box class is the best answer but the question is how to change out the existing text box on all columns in over a hundred grids?
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform