Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids and text boxes
Message
From
27/07/2000 13:06:34
 
 
To
27/07/2000 12:44:57
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00397698
Message ID:
00397710
Views:
23
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform