Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column locking in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00538759
Message ID:
00538932
Views:
8
Hi!

By clean way I mean, setting a property of a column and not several lines of magic code.

That is, a few commands. If you want more, that you will require to make complex algorithms that will take a lot of time. So think if you really need it and can efford it. There is anotehr thread about this where I already described an approach of how to solve the problem with jumping (locking screen for duration of scrolling). It is Thread #538711 Message #538741.
As about columns order, you will require to maintain the array with all ColumnOrder stored and make your own columns reordering algorithm. Update that array in the column Moved event (or header click event that checks ofCOlumnOrder changed compare to old value), update that array when you change order programmatically etc...

YMMV

>>Hi!
>>
>>You can add this to VFP 8 wishes list document here ;)
>>
>>>>Hi!
>>>>
>>>>Take a look to the last UT magazine.
>>>>
>>>>>A thread came across this morning that prompted me to ask. Does VFP 7.0 allow a clean way to lock a column in a grid so a user can scroll right or left and have one or more columns frozen, like excel does? By clean way I mean, setting a property of a column and not several lines of magic code.
>>>
>>>
>>>Good tip. Simple, but still VFP 7.0 could have made it a lot easier. Thanks for the reply and the article.
>
>I tested your code out and it works to a point. The problems are:
>
>The screen seems to jump or is chunky when I scroll.
>When I reach the end of the grid (far right) and come back around there are columns missing. So the code does not go far enough to cover directions and original placement of columns in the viewing order. So if column 1 and 2 are frozen, scrolling to the end should wrap back around to show the frozen columns and column 3 through end again. But your code does not take this into account and getting back to column 3 (original) is not easy and sometimes columns are out of order from the original display.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform