Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Colors
Message
 
To
25/05/1999 02:07:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00222199
Message ID:
00222730
Views:
37
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform