Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sizing objects in a grid column
Message
De
23/06/1997 08:49:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00036205
Message ID:
00037399
Vues:
45
>> >Now here's a good one. I'd like the captions on these buttons to be
>> dynamic, to reflect some value in a table. Without a .ControlSource
>> property, I've not been able to do this. Any ideas?
>>
>> You could use DynamicCurrentControl:
>> 1. Add couple commandbuttons with specific captions (hopefully you need in
>> few) to particular column.
>> 2. Issue something like:
>> this.column3.dynamiccurrentcontrol="iif(table.number!=1,'Command1','Command2
>> ')"
>> in Grid event and set Column3.Sparse=.F.
>> In this example you will see either Command1 or Command2 (with different
>> captions) depending on 'number' value.
>
>Actually, this isn't a bad idea. But it may be too limiting. Instead
>of having an IIF() in the expression, have a call to a UDF that always
>returns the name of the button object. But have the UDF itself change
>the button label.
>
>I've not tried this, but the concept has worked in other places very
>well.
>
>/Paul

IIF was used just as example, to make it clearer. Surely, it can be expanded to UDF.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform