Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coloring a column in a grid
Message
From
07/11/2001 18:06:30
 
 
To
07/11/2001 15:51:51
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00578726
Message ID:
00578807
Views:
22
>I modified a grid created by someone else so that that focus is always on the middle column by tabbing to it if one of the other two columns is selected. To highlight it I assigned it background foreground colors. I also set the selected colors.
>
>My problem is that if I click on columns 1 or 3 the cursor moves to column 2 and uses the selected colors (select on entry is set to T), but if I click on column 2 it does not use the selected colors but the colors for the rest of the column.
>
>I must be missing something simple. How do I get the selected cell to change colors when I click on it?

Hi Claude;

Try to put this on your grid
PROCEDURE INIT
ogrd=thisform.grid1
oGrd.Column1.dynamicbackcolor =;
 "IIF(thisform.myrowcol=thisform.actcol,rgb(255,255,255), rgb(196,196,196))"
ENDPROC
in grid's afterrowcolchange
procedure afterrowcolchange
LPARAMETERS nColIndex
thisform.actcol=nColIndex
endproc
in each grid/text1's when
procedure when
thisform.myrowcol=1  && or 2,3,4,5 depending what number do you want
endproc
Please let me know if it works fine ! Ok ?

CLAUDIO
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform