Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting DynamicBackColor in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01354447
Message ID:
01354479
Vues:
36
>>What if I want ONE column of all to be RED colored permanently, but just in some occasions it should look like all others?
>>What your Dynamic* property will look like?
>>Sure you could do something like:
>>
>>FOR EACH oCol in Grid.Columns
>>    IF oCol.Name == [Column73]
>>       oCol.DynamicBackColor = [IIF(SomeCondition,RGB(0,0,255),RGB(255,0,0))])
>>    ELSE
>>       oCol.DynamicBackColor = [IIF(SomeCondition,RGB(0,0,255),RGB(192,192,192))])
>>   ENDIF
>>NEXT
>>*** or
>>Grid.SetAll([DynamicBackColor],  [IIF(SomeCondition,RGB(0,0,255),RGB(192,192,192))]), [Column])
>>Grid.Column73.DynamicBackColor = [IIF(SomeCondition,RGB(0,0,255),RGB(255,0,0))]
>>
>>And no I didn't tell you always have to use Method, if ALL columns have to be the same then regular SETALL() works as expected.
>
>Why you're still not sleeping? :)
>
>My question is - how do we know the second portion RGB(192,192,192) - it should be taken from some grid's property, I would assume, that the DynamicBackColor should be
>
>Grid.SetAll([DynamicBackColor],  [IIF(SomeCondition,RGB(0,0,255),]+transform(grid.BackColor) +[,] [Column])
Because my dog die today and I'm still on beer (God, help me tomorrow, (today)).
As I said on my first reply to William - if you don't know how your grid is colored, then nobody knows.
Even if you give the user a choice to change the colors YOU know them beforehand, isn't it?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform