in reply to How to install Tk-ImageButton module in perl 5.12 using ppm
According to Activestate there is no Windows package for Tk::ImageButton for Perl versions > 5.10. But all is not lost - see the following
If that doesn't work then just copy the: ImageButton.pm ImageButton.pod files into your site_lib/Tk directory.
So, save ImageButton.pm and ImageButton.pod to your C:\Perl\site\lib\Tk (or C:\Perl64 if you're running 64-bit) and you'll be good to go.
update: A quick test to make sure the above works:
use strict; use warnings; use Tk; use Tk::ImageButton; my $mw = MainWindow->new; my $someimage = $mw->Photo(-format => 'bmp', -file => 'C:/WINDOWS/Zapo +tec.bmp'); my $otherimage = $mw->Photo(-format => 'bmp', -file => 'C:/WINDOWS/Gre +enstone.bmp'); my $ib = $mw->ImageButton( -imagedisplay => $someimage, -imageclick => $otherimage, -command => [ sub { print "It works"; } ], )->pack; MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to install Tk-ImageButton module in perl 5.12 using ppm
by Anonymous Monk on Oct 18, 2011 at 07:55 UTC | |
by BrowserUk (Patriarch) on Oct 18, 2011 at 08:31 UTC | |
by Anonymous Monk on Oct 18, 2011 at 08:40 UTC | |
by BrowserUk (Patriarch) on Oct 18, 2011 at 09:40 UTC | |
by Anonymous Monk on Oct 18, 2011 at 10:15 UTC |