Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:
I have looked at the Tk faq and am still stumped on this one.
I'm trying to draw a canvas and place a gif file upon said canvas.
Going to the Tk faq and replacing the file, I have the following code:
#!/usr/bin/perl -w use strict; use Tk; my $main = new MainWindow; my $canvar = $main ->Canvas; $canvar->pack; my $file = 'c:\html\atomic\0.gif'; my $img = $canvar->Photo( 'IMG', -file => Tk->findINC($file) ); $canvar->create( 'image',0,0, '-anchor' => 'nw', '-image' => $img ); MainLoop; __END__
What I'm getting is a lovely canvas, but no picture.
At present I'm working on a windows machine and will have do demo this on a windows machine, so my questions are:
Thanks for any and all help on this one. Sometimes getting your interface right is worse than the underlying code to make it all work. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: YATkQ ( yet another Tk question)
by converter (Priest) on Apr 28, 2002 at 20:12 UTC | |
|
Re: YATkQ ( yet another Tk question)
by DigitalKitty (Parson) on Apr 28, 2002 at 21:12 UTC | |
by Popcorn Dave (Abbot) on Apr 29, 2002 at 03:01 UTC | |
|
Re: YATkQ ( yet another Tk question)
by rbc (Curate) on Apr 29, 2002 at 04:23 UTC | |
by Popcorn Dave (Abbot) on Apr 29, 2002 at 05:01 UTC |