For starters, your description is a little confusing: you
have a 800 (wide) by 600 (tall) frame, and you place a
canvas inside this, with a max size of 300 x 300 (possibly
smaller on one or both axes, depending on the GIF to be loaded),
you have a mandatory scrollbar at the bottom of the canvas,
and an optional one along the right side. Then, you say
that you load a 200 x 700 image, which should mean 200 wide,
700 tall, and you say that you don't get the side scroll
bar, which is what you expected. (?? -- Did you really mean
that the image is 700 x 200? What happens when you load
an image that needs the vertical scrollbar?)
Anyway, I gather that the bottom scrollbar is spanning the
full width of the frame that contains the canvas (800 wide),
which certainly seems wrong -- although you say it actually
does scroll the image as intended when you click on its various
elements.
I don't have a direct answer
to the sizing problem, but I would point out that you could
(probably should) combine the two "-scrollbars" parameters
into one: -scrollbars => 'sow', -- sorry if
that turns out to be off the mark... Apart from that, have
you confirmed that the "$height" and "$width" variables
actually have the expected values (as opposed to, say, zero
or undef)?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.