Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Freezing a column in a Grid
Message
From
24/03/1998 13:44:50
 
 
To
24/03/1998 13:04:52
Michael Knelsen
Technology Management Corporation
Regina, Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00086740
Message ID:
00086759
Views:
34
>I have a grid that holds about 20 columns, and the first column in the grid is important to have on the screen when looking at columns that you need to scroll to. I tried to use the Partition Property, but it did not work quite the way I wanted it to work. Is there any other way to get a column to stay/freeze to the left side?
>
>Thanks in advance.
>Mike

****UT Search *****
>Is it possible to lock the first column of a grid so that it always stays visible while scrolling the remaining columns
left and right? I know this can be done in Excel, but I can't seem to find how to do it with a VFP grid.

If you have time and patience, you can play with this two snippets:

**** Grid.Scrolled event
LPARAMETERS nDirection
if thisform.blockscroll=.t.
return
endif
thisform.blockscroll=.t.
do case
case this.column1.columnorder=this.leftcolumn
case this.column1.columnorder<=this.leftcolumn-1
for n=this.column1.columnorder+1 to this.leftcolumn-1
this.column1.columnorder=n
endfor
this.doscroll(4)
this.refresh
case this.column1.columnorder>this.leftcolumn
for n=this.column1.columnorder-1 to this.leftcolumn step -1
this.column1.columnorder=n
endfor
this.column1.setfocus
endcase
thisform.blockscroll=.f.
*** Grid.afterrowcolchange event
this.scrolled
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform