NAME

Tkx::ImageButton - Graphic button megawidget for Tkx

VERSION

This documentation refers to Tkx::ImageButton version 0.13

SYNOPSYS

 use Tkx;
 use Tkx::ImageButton;

 my $mw = Tkx::widget->new('.');
 my $im_button_1 = $mw->new_tkx_ImageButton(
     -imagedisplay  => Tkx::image_create_photo(-file => 'button1.png'),
     -imageover     => Tkx::image_create_photo(-file => 'button2.png'),
     -imageclicked  => Tkx::image_create_photo(-file => 'button3.png'),
     -imagedisabled => Tkx::image_create_photo(-file => 'button4.png');
     -command       => sub { ... },
 );

 my $im_button_2 = $mw->new_tkx_ImageButton(
     -imagedisplay  => Tkx::image_create_photo(-file => 'button1.png'),
     -imageover     => Tkx::image_create_photo(-file => 'button2.png'),
     -command       => sub { ... },
 );

 ...

DESCRIPTION

Tkx::ImageButton is a megawidget that implementing graphical button with some options.

OPTIONS

The options bellow are passed through the constructor of megawidget.

-imagedisplay => image

Defines an image for the button. Image should be tk photo object.

-imageover => image

Image that be showed when button is mouse overed.

-imageclicked => image

Image for the clicked state.

-imagedisabled => image

Image for the disabled state.

-command => CODEREF

Command that be called when use has pressed the button

-blinkdelay => delay

Blink delay.

If the value is greater than 0, button will blinking every -blinkdelay.

METHODS

Tkx::ImageButton methods.

new

Constructor.

configure

Configure widget properties after constructing.

invoke

Invokes the command associated with the button.

BUGS AND LIMITATIONS

None known at this time.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Tkx::ImageButton

AUTHOR

Written by Alexander Nusov. Inspired by Dave Hickling (Tk-ImageButton).

COPYRIGHTS AND LICENSE

Copyright (C) 2010, Alexander Nusov <cpan at sancode.net>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.