Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynamicBackColor problems
Message
De
08/12/1997 09:30:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00064079
Message ID:
00064422
Vues:
51
>>>>>>Could someone tell me how to use a character value with this statement:
>>>>>>
>>>>>>thisform.Grid1.SetAll("DynamicBackColor", ;
>>>>>> "IIF thisform.grid1.ctime.combo1.value=1300, RGB(255,255,255) ;
>>>>>> , RGB(0,255,0))", "Column") && Alternate white and green records
>>>>>>
>>>>>>The value is actually character "1300", but putting in quotes obviously causes an error (quotes within quotes). How do I put quotes in?
>>>>>
>>>>>try this
>>>>>"IIF thisform.grid1.ctime.combo1.value='1300', RGB(255,255,255) ;
>>>>> , RGB(0,255,0))", "Column") && Alternate white and green records
>>>>>
>>>>>HTH
>>>>>Jeff
>>>>
>>>>Ya'll are both leaving out the open parentheses required for an implicit if...
>>>
>>>Erik, Jeff:
>>>
>>>I tried...
>>>
>>>thisform.Grid1.SetAll("DynamicBackColor", ;
>>> "IIF thisform.grid1.ctime.combo1.value='0800', RGB(255,255,255) ;
>>> , RGB(0,255,0))", "Column")
>>>
>>>I get no errors, but it simply does not change the colour of any grid lines. Where should I put the brackets Erik? This code is copied out of the VFP help from an example that changes every second line to green.
>>>
>>>Any other ideas why this might not work?
>>
>>To get the effect you are looking for, type this (exactly) in the grid's init:
>>this.SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255) , RGB(0,255,0))", "Column")
>
>Erik... thanks but I want to change the row colour based on the value in column 1 not every second line.

Then replace the conditional expression with yours, and the color values with your colors. The important thing to remember is, do NOT add any spaces or commas. The dynamic properties are _very_ finicky about this, and just will not work if one little space is put in the wrong spot.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform