Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynamicBackColor in a Grid
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
DynamicBackColor in a Grid
Divers
Thread ID:
00033148
Message ID:
00033148
Vues:
142
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform