Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynamicBackColor of Each Column are different!
Message
De
20/08/1999 05:46:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/08/1999 05:20:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00255740
Message ID:
00255742
Vues:
23
>I need to change the schedule grid into different dynamic color
>according each column value.
>
>i.e. Column1.DynamicBackColor = IIF(Empty(myTable.Field1), "0,0,0", "192,192,255")
>Column2.DynamicBackColor = IIF(Empty(myTable.Field2), "192,192,0", "192,255,192")
>...
>
>I wonder that I can assign the DynamicBackColor of Each Column in
>Character type, but the BackColor DO NOT Change as I want!!!
>
>I know if the whole grid change all Columns into appointed color by
>Setall() in example.
>
>But I need to set each column, I can't use the SetAll Function!
>SetAll function is appointing the RGB() value but DynamicBackColor of each Column is character.
>
>What Can I do?! ~~>-<~~
>
>Thanks for help!!

Justok,
First the expression is wrong. You must put the whole expression as a char string :
.DynamicBackColor = "IIF(Empty(myTable.Field1), rgb(0,0,0), rgb(192,192,255))"
Next, to make the life easier for you, you could delegate the coloring to a function :
*Grid.init
for each oColumn in ThisForm.Grid1.columns
 oColumn.DynamicBackColor = "GimmeColor(["+oColumn.Controlsource+"])"
endfor
Your function would then return a color based on controlsource.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform