http://qs321.pair.com?node_id=609797


in reply to Perl/Tk scrolling question...

So if the user scrolls horizontally to the "middle" of the day-of-week range, then scrolls vertically to the "middle" of the time-of-day range, both the day-of-week labels and time-of-week labels need to still be visible, right?

For that to work, I think you actually need three scrolling windows:

I don't have any specific coding examples handy, but I do remember that there's a way to set up callbacks on the scrollbars for a given scrolling window. The idea is that the scrollbars for the grid window will invoke call backs that will trigger an equivalent amount of scrolling in the x dimension on the column-heading window, as well as an equivalent amount of y-dimension scrolling on the row-heading window.

Shouldn't be too hard, once you find the right Tk man page (probably Tk::Scrollbar). Good luck with that.

(update: fixed the link and a spelling error, and wanted to add that you probably want to limit the number of visible scrollbars for all those scrolling windows -- display just one scrollbar for each direction -- and bear in mind that Tk lets the user to a "grab-and-drag" to scroll the grid window.)