NAME

Rui::Widget::Button - the button widget


SYNOPSIS

  $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


SUPERCLASS

the Rui::Widget::Label manpage


EVENTS

Click
the Rui::Event manpage. The user has clicked the button.


DESCRIPTION

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.


METHODS

flat

parameters
Setting - Boolean. True if button is to be shown flat

description
Get/set button flatness.

underlineHover

parameters
Setting - Boolean. True if button is to be underlined when user passes over it with mouse

description
Get/set underline hover feature.

confirm

parameters
Setting - String. The text of the question displayed when the confirmation dialog pops up

description
Get/set confirmation message