Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Colors of GRID in different column with criteria
Message
De
14/06/2002 09:39:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00668428
Message ID:
00668497
Vues:
23
>Hi guys...
>
>got some trouble....
>but i don't know how to explain it properly... maybe i'll use some example...
>
>------------------------------------
>| NAME | A | B | C | D | E |
>------------------------------------
>| JACKY | M | H | M | K | K |
>| LONA | H | K | H | H | H |
>| ERICK | H | M | K | M | M |
>| JAMIE | K | M | H | K | M |
>| ERRIN | K | H | M | K | K |
>------------------------------------
>
>Maybe with the samples grid above i can explain it properly...
>what i try to do is to make the column with value of "M" = rgb(255,0,0)
>if the column value = "H" then rgb(0,255,0) and with K is rgg(0,0,255)
>So by that i could make some grid with a colourfull information from the table of course.....
>I've try with many things but still no prove...
>I've learn in samples solution.pjx in VFP6 in the controls with grid .... checkerboard... but it only manipulate criteria Mod(COlumnCOunt%2)...
>
>Just that it...
>Hope any one could help me quick...
>Thanks...
>
>regards,
>tut_arie

Tut,
You could do it in many ways. As values get crowded it'd be harder to control with nested iif(). Create a custom form method that would return color value to you :
*Grid.init
for each oColumn in this.Columns
 oColumn.DynamicBackColor = "(thisform.CellColor(upper('"+;
               oControl.ControlSource+"')))"
endfor

*Form.CellColor
lparameters tcControlsource
do case
 case tcControlsource = 'MYALIAS.MYFIELD1' and eval(tcControlsource) = 'H'
  return Hcolor
*...
endcase
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
Répondre
Fil
Voir

Click here to load this message in the networking platform