Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checkbox in a grid
Message
De
06/01/2014 17:30:26
 
 
À
06/01/2014 14:35:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01591406
Message ID:
01591433
Vues:
111
>Sorry for asking this question, but how do I display a checkbox in a grid, when the underlying field is logical.
>
>1. make sure that your check box class is available on the form controls toolbar. In the form designer, click on the View Classes toolbar button. (This is the button that looks like a set of books.) Select the Add option and find the appropriate class library in the open files dialog.
>2. in the drop down list at the top of the property sheet, select the grid column that will hold the check box. After clicking on the check box in the form controls toolbar, click on the grid column into which you want to drop it. If you now look at the controls listed under that column in the property sheet, you will see the checkbox that you just added.
>3. Select the Text1 control in the column to which you just added the check box in the drop down list at the top of the property sheet
>4. Click on the title bar of the form designer
>5. Press the delete key
>6. Select the column to which you just added the check box in the drop down list at the top of the property sheet and set its sparse property to .F.

I still can't get this to work:

if I set the controlsource of the column to the field, it doesn't update the cursor and if I set the controlsource of the checkbox to the field I get a data type mismatch when selecting the checkbox.

It doesn't seem to make a difference whether I do it in the property sheet or in the init method of the checkbox.

Note that the field type is logical and the cursor is READWRITE.

What is the recommended way to do this?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform