Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buttons in a grid change caption
Message
De
06/05/2013 14:48:45
 
 
À
06/05/2013 13:48:50
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01572779
Message ID:
01572795
Vues:
59
chkFoo.Caption = "Hi mom!"
* If it's on the form, then it's relative.
* You can use SET STEP ON somewhere to see how to access the object.
* Depending on where you are trapped in your code, it could be something like:
this.parent.Checkbox1.Caption
Can you do something on your table like:
SELECT *, IIF(cMyField="Y", 1, 0) AS nCheckboxField ;
    FROM whatever ;
    INTO CURSOR c_whatever
And then use that cursor instead? I use checkboxes on grids regularly. I typically add code on the InteractiveChange() event to call the ProgrammaticChange() event, which then has a test and sets the backColor:
this.backColor = IIF(this.Value = 1, RGB(0,255,0), RGB(255,0,0))
For visual cues.



>That will not work. The control source is a character and check box expects bool or number.
>I don't understand how to display the caption on a checkbox either.
>
>>That might work. I will try it.
>>
>>>>I am trying to make a grid work for a touch interface and I would like to us buttons in
>>>>the grid but I can't seem to make the row description show up as button caption.
>>>>Is there a way to do this?
>>>
>>>
>>>You can put a checkbox in a grid and then set it to 3D so it looks like a button (set Style=1 (Graphical)).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform