Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Background colours in a grid
Message
De
12/03/2003 23:27:57
Dave Nantais
Light speed database solutions
Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00765059
Message ID:
00765249
Vues:
17
>Try to add to Grid.Refresh method:
>oGrd.Column1.DynamicBackcolor=[IIF(discontinu, 12632256, 0)]
>oGrd.Column1.DynamicForecolor=[IIF(Unit_price - Unit_cost > 5, 16777215, 0)]

i figured out that oGrd.Column1.DynamicForecolor = ""IIF(Unit_price - Unit_cost > 5, RGB(255,255,255), RGB(0,0,0))"
and i just add these commands for every individual column in the grid.
This allows me to control the colour of an individual grid element.

thanks for the help.

>
>>In the samples provided with VFP 6 we are shown how to dynamically alter the background and foreground colours of a grid so that rows in the grid can be a specific colour based upon a certain condition.
>>This is shown in DynGrid.scx.
>>
>>How does one modify the background colour of an individual column cell.
>>I've attempted lines like the following :
>>
>>oGrd.Column1.Text1.ForeColor = IIF(discontinu, 12632256, 0 )
>>
>>oGrd.Column.SetAll("forecolor", ;
>> "IIF(Unit_price - Unit_cost > 5, RGB(255,255,255), RGB(0,0,0))", "Textbox")
>>
>>oGrd.Column.SetAll("forecolor", ;
>> "IIF(Unit_price - Unit_cost > 5, 16777215, 0 ))", "Textbox")
>>
>>
>>All are unsuccessful.
>>Any Ideas on how to set the background and foreground colours for an INDVIDUAL grid cell conditionally based upon a table field value?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform