Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Perl/Tk Scroll

by keszler (Priest)
on Oct 31, 2011 at 02:30 UTC ( [id://934802]=note: print w/replies, xml ) Need Help??


in reply to Perl/Tk Scroll

You need to set the canvas' scrollregion to the size of the image (plus anything else on the canvas).

use strict; use Tk; my $mw = MainWindow->new; my $mycanvas = $mw->Scrolled( "Canvas", -width=>800, -height=>600, -scrollregion => [0,0,1019,1600], -scrollbars=>'se' )->pack(-expand => 1, -fill => 'both'); my $headerpicpath = '/some/path/image_1019_wide_1600_high.gif'; my $pic = $mw->Photo(-file=>$headerpicpath); $mycanvas->createImage(0,0,-image=>$pic,-anchor=>'nw'); MainLoop;

Replies are listed 'Best First'.
Re^2: Perl/Tk Scroll
by mikasue (Friar) on Oct 31, 2011 at 02:40 UTC
    THANK YOU!!!!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://934802]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found