Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check Box back color in grids
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01171778
Message ID:
01172159
Vues:
19
You are correct in that the Control class does not allow access directly to the objects contained within the control object. You need to provide an interface for teh control class that allows access to the contained checkbox.

If you CREATE CLASS the dialog will allow you to name the class and identify the parent class for the definition. You want to define a subclass of Control and then add a checkbox to it. You then need to add some properties and methods to the cntrol object to allowe you to manage the checkbox inside. For example you would probably want to add a property named checkboxControlSource to the control class and then in the Init of the control class put something like;
This.Check1.ControlSource = This.CheckboxControlSource
Ultimately you will put the control class in the column of your grid and set its CheckboxControlSource property apppropriately. You will also probably need a ReadCheckboxValue and WriteCheckboxValue methods that do what their names indicate. Keep in mind that methods of the Control Class can manupulate the contained objects, it is just other objects that cannot get to the contained objects directly (they need to work through the control object).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform