Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid color
Message
 
À
07/02/1999 23:50:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00184473
Message ID:
00185395
Vues:
40
Erik,
Yes, the SetAll() code as you wrote it works fine. What I have is FIRST a SetAll() with 3 nested IIF() statements. This worked fine, after I got all the parens and commas in the right place. Then we decided to give the enduser control over their colors, so instead of RGB(255,0,0) it would be "nBackColor" where nBackColor was picked with GetColor() and was a numeric value.

What I found is that I couldn't use a variable inside SetAll(), but COULD use it in Thisform.Grid1.Column1.DynamicBackColor = nBackColor. In the SetAll() format I ended up parsing out the 3 RGB() parameters from the GetColor() value, making a single variable
cRGBFore = 'RGB'+cf1+','+cf2+','+cf3+')'
.SetAll("DynamicForeColor", ;
   "IIF(ttime.sh1 = 'B  ' , &cRGBFore, rgb(0,0,0))", ;
   "COLUMN")
Looks simple now, took several hours of experiments. Turns out if setall doesn't like a parameter it simply treats it like 0. So stuff that I THOUGHT was working, with RGB(0,0,0) wasn't.

If anyone is interested in the PRG that takes a GetColor() number and returns the 3 RGB parameters let me know by e-mail.

Probably more than you wanted to know.....

Barbara

>Barbara- I don't have a problem with it either- I have only had the problem when trying to assign these in code. The proprety sheet has always worked fine. Looking back though it was a long time ago that I had this trouble, and at the time, I oculd have been doing ther things wrongly.
>
>Are you able to do code likethe following?
>
>THIS.SetAll("DynamicBackColor","IIF(MyTable.MyValue, RGB(255,0,0), RGB(255,255,255))
>
>this is what I got caught up on.
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform