This gives a slideshow type effect by creating, updating and destroying the button for each image.#!/usr/local/bin/perl use strict; use warnings; use Tk; use Tk::Photo; my $mw = new MainWindow; $mw -> geometry ("820x780"); my @files = <*gif>; for my $image (@files) { my $shot = $mw->Photo(-file => "$image"); my $btn = $mw->Button(-image => $shot)->pack(); $btn->update; sleep(1); select(undef, undef, undef, .1); $btn->destroy; } $mw->MainLoop;
In reply to Re: Image in Perl TK?
by hominid
in thread Image in Perl TK?
by hill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |