Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make separate grids scroll in lockstep
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to make separate grids scroll in lockstep
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01318573
Message ID:
01318573
Views:
79
A form contains two grids. The grid on the left has a single column which lists datetime values--similar to an Outlook calendar in Single-Day view.

The second grid to its right contains an ordered list of widgets.

I need to scroll up and down on the timeline grid on the left, and see the records on the right scroll up and down in lockstep.

Someone will ask, "why not just combine the two grids into one?" Because sometimes I need to be able to re-synchronize the horizontal alignment of the records in the two grids. For example, I may need to bump the list of widgets up or down a couple of notches to resynchronize them to the timeline grid on the left.

To accomplish this, I added a command button to the form. When the user clicks the button, the simultaneous scrolling needs to stop, so that the user can scroll either grid independent of the other. Then, when the user clicks the button again, scrolling in lockstep needs to continue, based on the new row relationship between the two grids.

To complicate matters, it appears that the functionality of the scroll bar is significantly different from what happens when users move up/down through the records in the grid using the up and down arrows.

I've experimented with DoScroll, and AfterRowColChange, but haven't figured out how to force the grids to scroll in lockstep with each other.

Can anyone give me some pointers on how to accomplish what I'm looking to do?

Thanks in advance!
David Martin
Next
Reply
Map
View

Click here to load this message in the networking platform