in reply to Perl/Tk scrolling question...
For that to work, I think you actually need three scrolling windows:
- a "column headings" window that shows the day-of-week labels (has a height of one line), and only scrolls left-to-right;
- a "row headings" window that shows the time-of-day labels (has a width of 5 characters: HH:MM), and only scrolls up-and-down;
- the data grid table of 7 columns by however many rows (each cell is as big as you think necessary), and scrolls in all directions.
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.)
|
---|