|P is for Practical|
TK Scrollbars not working correctlyby Popcorn Dave (Abbot)
|on Jan 22, 2003 at 05:23 UTC||Need Help??|
Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:
A while back I wrote an image map program in Perl for a project in a Perl class I took. Well I went to use it on a large graphic the other day and discovered a minor flaw, so needless to say I'm in the process of fixing it now. :)
My problem is with the scrollbars. They are showing up as advertised, but they're filling the entire canvas space and I can't figure out exactly how to set it to a percentage of the canvas width.
My frame is set to 800 x 600, and the canvas is based on the size of the GIF file that it's reading. If it's larger than 300 pixels either way, the value is set to 300 pixels.
The code I'm working with is this:
My graphic is about 200 x 700 and when I try it with the program, I get the bottom scroll bar, but not the side bar, which is what I would expect as I've set it that way. But the bottom scrollbar fills the entire area on the bottom. Using the arrow bits on either side does move the graphic along fine.
Is there something that I haven't set in my scrollbar? I looked in the Perl/Tk book but that wasn't much help unless I overlooked something obvious.
Thanks in advance!
There is no emoticon for what I'm feeling now.