Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynamicBackColor length limitations and complex conditio
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01419452
Message ID:
01419456
Vues:
92
This message has been marked as the solution to the initial question of the thread.
Hi, Bhavbhuti

you can use method of grid or form
*grid::SetDYNAMICBACKCOLOR(lcName)
LOCAL loCol
loCol=EVAL("THIS."+ lcNAME )
RETURN IIF((NOT EMPTY(RECNO(THIS.RECORDSOURCE))) AND ;
                   (loCol.ENABLED AND (NOT loCol.READONLY)), goApp.nBackColorFld, ;
                   IIF(goApp.nOSVersion < 5.01, goApp.nBackColorForm, THIS.BACKCOLOR))


*grid::ProcessColumn()
.DYNAMICBACKCOLOR = "THIS.Parent.SetDYNAMICBACKCOLOR('"+.NAME+"')"
MartinaJ

>Hi all
>
>In my grid class I have a ProcessColumn() method to go through each column and set it's DynamicBackColor. I have managed to reach 190 characters:
>
	.DYNAMICBACKCOLOR = "IIF((NOT EMPTY(RECNO('" + THIS.RECORDSOURCE + "'))) AND (THIS." ;
>		+ .NAME + ".ENABLED AND (NOT THIS." + .NAME ;
>		+ ".READONLY)), goApp.nBackColorFld, " ;
>		+ "IIF(goApp.nOSVersion < 5.01, goApp.nBackColorForm, THIS.BACKCOLOR))"
>
>Now I need to add one more condition for columns that contain a class which range checks numeric values entered by the user and need a different color if the range check fails.
>
>Is this the only way to keep piling in IIF() for this or can I do something better?
>
>Thanks and regards.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform