Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids and text boxes
Message
De
27/07/2000 13:06:34
 
 
À
27/07/2000 12:44:57
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00397698
Message ID:
00397710
Vues:
19
Hi all:

I have a grid with a couple of text boxes that hold cost, price, and available. I retrieve live-price information and need to indicate the changes by changing the background color of the text box.

If the cost goes down, the background should change for that particular textbox to green.

The problem i'm having is when I change the backcolor property, the textbox background stays white unitl i select the textbox. How can I have that particular box show green background whether selected or not?


Are you using the Textbox.BackColor()?
For this you should be using the Column.DynamicBackColor and DynamicForeColor properties.
How are you keeping track of the change?
If you're comparing 2 fields (like OldCost and NewCost, e.g.) that would look something like this - this example does Green/Black for down, Red/White for up, White/Black as default:
Column.DynamicBackColor="IIF(NewCost < OldCost, RGB(0,255,0), IIF(NewCost > OldCost, RGB(255,0,0), RGB(255,255,255)))"
<pre>Column.DynamicForeColor="IIF(NewCost > OldCost, RGB(255,255,255), RGB(0,0,0))"
HTH
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform