The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IWL::Button - a button with a background

INHERITANCE

IWL::Object -> IWL::Widget -> IWL::Button

DESCRIPTION

The Button widget is different from a regular Button widget, in that it can be styled with a background.

CONSTRUCTOR

IWL::Button->new ([%ARGS])

Where %ARGS is an optional hash parameter with with key-values. image: set the image of the button alt: set the alt text for the image of the button label: set the label of the button size: default - 26px in height, medium - 20px in height, small - 13px in height,

IWL::Button->newFromStock (STOCK_ID, [%ARGS])

Where STOCK_ID is the IWL::Stock id. size: default - 26px in height, medium - 20px in height, small - 13px in height,

METHODS

setLabel (TEXT)

Sets the given text as the label of the button

Parameters: TEXT - the text for the label

getLabel

Gets the text of the button label

setImage (SRC, [ALT])

Sets the given url as the source of the image

Parameters: SRC - the url for the image. If the SRC begins with IWL_STOCK_, the SRC is treaded as a stock id, ALT - the alternative text for the image, optional.

getImage

Returns the button image

setFromStock (STOCK_ID)

Sets the button from the stock id

Parameters: STOCK_ID - the stock id

setSubmit (NAME, [VALUE, FORM_NAME])

Sets the button to act as a submit button for a form. It creates a signal handler to the CLICK signal.

Parameters: FORM_NAME - the name of the form. NAME - the name of the element, VALUE - the value of the element

setHref (URL)

Sets the href of the anchor. Due to one of the many bugs in Internet Explorer involving buttons, it also has to set an onclick handler to "document.location.href = $url"

Parameters: URL - the url of the href

LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Viktor Kojouharov. All rights reserved.

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

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 429:

You forgot a '=back' before '=head1'