in reply to Image in Perl TK?
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Image in Perl TK?
by zentara (Cardinal) on Dec 19, 2008 at 19:39 UTC |