There's more than one way to do things | |
PerlMonks |
Re: Scrollbars in Perl::Tkby elef (Friar) |
on Jan 13, 2012 at 09:43 UTC ( [id://947715]=note: print w/replies, xml ) | Need Help?? |
I bumped into this old thread looking for a way to make my main window scrollable. Both the suggested solutions work for me, but both are incomplete. With the code posted, the frame remains a postage stamp sized rectangle in the middle of the mainwindow when the mainwindow is resized. I added the options (-fill => 'both', -expand => 1) to pack for the frame (and pane) and now things look as they should. For some strange reason, Scrolled even shrinks the frame it's added to. If I run PodMaster's code as is, the frame is too small to fit all the text. Here's what PodMaster's code generates for me: Default view of the window generated after removing the scrollbars from the code: http://dl.dropbox.com/u/16377950/kepek/scrollframe_1.png PodMaster's version with what are intended to be optional scrollbars: http://dl.dropbox.com/u/16377950/kepek/scrollframe_2.png - note that both scrollbars are showing up even though they should disappear when the window is this large, and that text is left off both vertically and horizontally. After adding (-fill => 'both', -expand => 1): http://dl.dropbox.com/u/16377950/kepek/scrollframe_3.png - horizontal scrollbar disappeared as the window is wide enough to show all text, vertical scrollbar showing up.
In Section
Seekers of Perl Wisdom
|
|