A
Andy
I have converted an A97 report to A2k. Each textbox in the report's
detail section calls a function to check the value of the textbox, and
depending on the value, change the background color accordingly.
Value Color
< -20 red
between -20 & -10 yellow
between -10 & -1 green
The problem is the back ground color gets changed for the next display
of the widget, not the current display.
The function performing the evaluation accepts the data value and the
textbox control Id as parameters:
function getCellColor(Value as string, Widget as textbox) as string
textbox1 control property is set to: =getCellColor([V1], [text1])
textbox2 control property is set to: =getCellColor([V2], [text2]). etc
The backcolor is set using widget.backcolor = long(appropriate value for
desired color). The function also returns a string for display in the
textbox.
All returned strings are displayed in the correct textbox. All
background colors are displayed in the next occurence of the textbox
(next line) of the report.
How can I change the back ground color of the current widget?
Andy
detail section calls a function to check the value of the textbox, and
depending on the value, change the background color accordingly.
Value Color
< -20 red
between -20 & -10 yellow
between -10 & -1 green
-1 gray
The problem is the back ground color gets changed for the next display
of the widget, not the current display.
The function performing the evaluation accepts the data value and the
textbox control Id as parameters:
function getCellColor(Value as string, Widget as textbox) as string
textbox1 control property is set to: =getCellColor([V1], [text1])
textbox2 control property is set to: =getCellColor([V2], [text2]). etc
The backcolor is set using widget.backcolor = long(appropriate value for
desired color). The function also returns a string for display in the
textbox.
All returned strings are displayed in the correct textbox. All
background colors are displayed in the next occurence of the textbox
(next line) of the report.
How can I change the back ground color of the current widget?
Andy