Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buttons in a grid change caption
Message
De
06/05/2013 16:53:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/05/2013 12:30:02
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:
01572815
Vues:
84
>Hi All
>
>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?

Fox grid has only one row, not a collection of rows. That row is the active row; the others are just painted during the refresh, when the devil and the details happen. I've tried to put stuff which would change properties of objects in the objects' own .refresh(), but it doesn't work. The refresh seems to only evaluate dynamic properties and the controlsources, and it seems to do that after the objects' .refresh() has run, so it overrides what you did and generally messes things up.

The approach of using a function to get the value of .dynamicfontbold or some such property sometimes works, unless it clashes with some setting somewhere, and as grid has oodles of them, you can have fun all day finding which ones are these (or you may get lucky).

The other approach is to have as many different controls as you want. In your case, as many commandbuttons as you need different captions. If that means one per visible row, so be it. Then use .dynamicControl property to select the right button for each row. I've done that with images, in VFP 7 to 9, and it worked - I had five controls to display five images and that was it.

Any attempt to change anything meaningful on an object in the grid once it's instantiated has so far led me to this or that bug, unexpected behavior or just downright failure. Also the failure to understood what rules are in effect, because it sometimes worked, some of the time.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform