Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid with Checkbox
Message
De
20/02/1998 20:04:10
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00079961
Message ID:
00080239
Vues:
29
>I am sure classes exist for this. What some of us have been doing is dropping a caption-less checkbox onto a container so we can center the checkbox in the container. Then we do a Copy of the container, place the grid in "edit-mode", and paste the container with the checkbox into the grid column. The trick to making it work, is placing specific code in the init of the grid-column to set the control source of the column and check box to the same thing.
>
>Otherwise, dropping a checkbox onto a grid-column still works. The grid has to be in edit-mode at the time.

Of course, if you're really crazy, what you can do is write a Column class in .prg code, and add a Header and a CheckBox (or Container/CheckBox as suggested). Then, instead of defining the number of columns visually, add them on the fly in the Init() of the grid, setting the properties of each Column object as you add each one.

There's *lots* to be said for the flexibility that approach will give you - I've been doing that a lot lately with DataEnvironments, and I just wrote a CheckBox Group (somewhat like an OptionButton Group) class that is self-configuring to a very strong extent.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform