Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Freeze a pane in a grid
Message
From
26/02/1998 14:59:03
 
 
To
25/02/1998 13:33:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00081130
Message ID:
00081505
Views:
20
>>I have a view bound to a grid and wish to freeze the
>>first column of the grid and scroll the other columns
>>horizontally. If this is possible could someone please
>>get me jump started. Thanks in advance.
>>
>>Dave
>
>****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
for n=this.column1.columnorder to this.leftcolumn
> 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

The above snippets worked great. You are the man. Thanks for the
help.

Dave
Previous
Reply
Map
View

Click here to load this message in the networking platform