Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I dynamically change one cell in a grid?
Message
De
09/08/2001 16:59:18
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00542012
Message ID:
00542025
Vues:
21
Nadya-

>If there are bunch of cases, create a method of your form, called MyColor
>column1.DynamicBackColor="thisform.myColor(MyTable.MyField)"
>
>and put this code into MyColor method:
>
>lparameter tValue
>local lnColor
>do case
>   case tValue=x
>       lnColor=rgb(....) && Red
>   case tValue=y
>       lnColor=rgb(...) && Blue
>    etc...
>endcase
>return m.lnColor
I'm being dense about something. When I try something like this:
*!* Temp.MyGetColor()
LPARAMETERS tvValue
DO CASE
	CASE tvValue = "31011     "
		ln = RGB(255,0,0)
	CASE tvValue = "31036     "
		ln = RGB(128,255,0)
	OTHERWISE
		ln = RGB(128,0,128)
ENDCASE
RETURN ln
I get an error. The error depends how I've set the dynamicbackcolor property. However, neither way works. The indication it's an invalid value for the property. What am I doing wrong?

If I set th property like so =thisform.GetMyColor(EVAL(this.controlsource)), method executes as I expect but when it returns I get the error: Error loading file...DynamicBackColor: Data type is invalid for this property

If I set the property as you suggest: thisform.GetMyColor(EVAL(this.controlsource)) I get Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property and the method is not even called.

Neither works, of course.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform