Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting DynamicBackColor in a grid
Message
De
12/10/2008 20:40:03
 
 
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:
01354480
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])
Does this help:

Re: Grid Highlight Problem - Can you Duplicate it? Message #1050498
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform