Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Put a Checkbox in a grid
Message
 
 
À
08/09/1998 21:48:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00133914
Message ID:
00134631
Vues:
12
>>Put the grid in edit mode [right click on grid, then click on Edit]. Click on the check box control, then click in the column where you want the check box. Go to properties of the column and make the checl box the CurrentControl.
>>
>>Many of us, however, will place a Checkbox in a container object in order to center the check box -- the check box is centered in the container [based on container width], and the container width is based on the width of the column. Then we drop the container in the grid column. To make it work, I have had to put code in the column init to bind a data field to the checkbox -- this.container1.checkbox1.controlsource = mytable.fieldname
>
>Thanks Mark, If you don't mind a few more questions...
>
>Do you create a class for the container?

Yes, I have a CheckBoxContainer class
>
>How do you base it on the container width, column width?
>

Maybe someone else can answer. I have tried with the container resize method, but at runtime, VFP will not allow me to change the width of the container based on the width of the column. I even go to the debugger, find the coontainer object and change its width right there. It just reverts back to the original width.

For now I am just using a container of fixed width of 40 with the checkbox centered in that. If a user changes the width of the column at runtime, the resize method does fire, but no width or re-centering occurs. :(
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform