Rui::Widget::Button - the button widget
$button = $parent->Button( value => 'click me', image => Rui::Image->new(file => "pic.gif", size => [16, 16]), hAlign => 'center', flat => 1, underlineHover => 1, confirm => 'Are you sure?', events => { Click => sub { shift->source->value('clicked!') }, }, ); $button->flat(0); # default $button->underlineHover(0); # default
the Rui::Widget::Label manpage
A Button is a label that can be pressed. You can use the flat
and
underlineHover
features to change the button appearance. Use
confirm
to show the user an OK/Cancel dialog. The event will be fired
only if the user chooses OK.