>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?
Subclass the textbox, and add an assign method to the value property; in the value_assign, add the following code before assigning the new value passed in to the property value:
IF m.NewValue < this.value
this.backcolor = RGB(0,255,0)
this.disabledbackcolor = RGB(0,255,0)
ELSE
this.backcolor = RGB(255,255,255)
this.disabledbackcolor = RGB(230,216,174)
ENDIF
=this.refresh()