Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicBackColor in a Grid
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
DynamicBackColor in a Grid
Miscellaneous
Thread ID:
00033148
Message ID:
00033148
Views:
144
I try to use the Arnon Gal-oz's Tip about color in grid.
I have a grid and an entry field for a rapid search in the grid like in FoxPro help dialog box (by index).
The search and reposition in the grid work but I have always the same error.
"Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR (or DYNAMICFORECOLOR) property".

The follow lines are the code I use :

In a method ColorLine()
WITH ThisForm
.gdGrid.SetAll("dynamicbackcolor", "IIF(RECNO() = .nRecno, .GridBackColor, .gdGrid.BackColor)", "Column")
.gdGrid.SetAll("dynamicforecolor", "IIF(RECNO() = .nRecno, .GridForeColor, .gdGrid.ForeColor)", "Column")
.gdGrid.Refresh()
ENDWITH

In the Form.Init()
WITH ThisForm
.GridBackColor = .gdGrid.column1.text1.SelectedBackColor
.GridForeColor = .gdGrid.column1.text1.SelectedForeColor
ENDWITH
I tried to store the result of GetColor() in GridBackColor and GridForeColor and the same error occurs.

nRecno is an property of ThisForm who contains the last recno() found

Thank for your help.
Stephan
Analystik Team
1430 Belanger
Montreal (Quebec)
Canada
(514) 278-2727
analyste@analystik.ca
Next
Reply
Map
View

Click here to load this message in the networking platform