Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Colors
Message
 
À
25/05/1999 02:07:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00222199
Message ID:
00222730
Vues:
35
Thanks, Cetin,

I was hoping to get code that would go in a Grid property instead of being repeated in each column. I appreciate your posting it for me.

Barbara


>Hi Barbara,
>Either set it in gotfocus :
*gotfocus
>with this
> .SelectedBackColor = .backcolor
> .SelectedForeColor = .forecolor
>endwith
or (sounds better) just do it once (referring to code) in grid.afterrowcolchange :
LPARAMETERS nColIndex
>WITH this
>  IF !empty(.Columns(nColIndex).dynamiccurrentcontrol)
>    cCurrentControl = eval(.Columns(nColIndex).dynamiccurrentcontrol)
>  ELSE
>    cCurrentControl = .Columns(nColIndex).currentcontrol
>  ENDIF
>  lcBackColor = .Columns(nColIndex).DynamicBackColor
>  lcForeColor = .Columns(nColIndex).DynamicForeColor
>  IF pemstatus(evaluate(".Columns(nColIndex)."+cCurrentControl), "SelectedBackColor", 5)
>    WITH evaluate(".Columns(nColIndex)."+cCurrentControl)
>      .SelectedBackColor = iif(!empty(lcBackColor), eval(lcBackColor), .BackColor)
>      .SelectedForeColor = iif(!empty(lcForeColor), eval(lcForeColor), .ForeColor)
>    ENDWITH
>  ENDIF
>ENDWITH
Cetin
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform