mikasue has asked for the wisdom of the Perl Monks concerning the following question:
I am developing a Perl Tk app and have created a nice background image that I want to display throughout for each screen. So I decided to use a Canvas widget to draw the background image then everything else on top of it. Well it looks great but even though I used Scrolled("Canvas") The window does not scroll when I reduce the resolution from 1280x800 to 1024x768 to 800x600.
I could create a background image for each size and check the screen size before I load the main screen and render the canvas according to the resolution. But i'm sure there is a better way to just make this Canvas scroll.
I've tried to use Scrolled, Pane, even attach scrollbars -- Nothing is scrolling this background image. Any suggestions, advice or the solution :-) would be appreciated.
use Tk; my $mw = MainWindow->new; my $mycanvas = $mw->Scrolled("Canvas",-width=>800, -height=>600, -scro +llbars=>'se'); my $headerpicpath = $Bin."logo.gif"; my $pic = $mw->Photo(-file=>$headerpicpath); $mycanvas->createImage(425,400,-image=>$pic);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/Tk Scroll
by keszler (Priest) on Oct 31, 2011 at 02:30 UTC | |
by mikasue (Friar) on Oct 31, 2011 at 02:40 UTC | |
|
Re: Perl/Tk Scroll
by zentara (Cardinal) on Oct 31, 2011 at 10:50 UTC |