Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: (ichimunki) Re x 3: Tk::JPEG

by Jouke (Curate)
on Aug 16, 2001 at 16:50 UTC ( #105347=note: print w/replies, xml ) Need Help??


in reply to (ichimunki) Re x 3: Tk::JPEG
in thread Tk::JPEG

Brrr...you're right! I was way too quick with my answer! It should be this:
my $mw = MainWindow->new; my $photo = $mw->Photo( "photo" -format => 'jpeg', -file => 'test.jpg' ); my $button = $mw->Button(-image => "photo")->pack(); MainLoop;


Jouke Visser, Perl 'Adept'
Using Perl to help the disabled: pVoice and pStory

Replies are listed 'Best First'.
(ichimunki) Re x 5: Tk::JPEG
by ichimunki (Priest) on Aug 16, 2001 at 17:06 UTC
    Now that's a trick worth knowing about! Keeping all image widgets as children of the MainWindow rather than in the widgets themselves makes managing them a lot easier (flipping images in Tk is a terrible memory leak unless done very carefully). It also allows for sharing a single photo widget among several other widgets if needed without having to reparent the original photo each time.
Re^2: (ichimunki) Re x 3: Tk::JPEG
by padawan_linuxero (Scribe) on May 15, 2008 at 22:52 UTC
    Hi looking for something like this just to give me an idea I notice a missing comma it should be like this ?
    my $mw = MainWindow->new; my $photo = $mw->Photo( "photo", -format => 'jpeg', -file => 'test.jpg' ); my $button = $mw->Button(-image => "photo")->pack(); MainLoop;
    Or am I wrong?
    Thanks with the example you help me nail the problem
    THANKS!!!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2019-08-25 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?