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.
SIGNALS
- load
-
Fires when the button has finished loading
- load
-
Fires when the button has finished adjusting
METHODS
- setLabel (TEXT)
-
Sets the given text as the label of the button
Parameters: TEXT - the text for the label
- getLabel
-
Returns 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: NAME - the name of the element, VALUE - the value of the element, FORM_NAME - the name of the form
- 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
- setDisabled (BOOL)
-
Sets whether the button will be disabled
Parameters: BOOL - true if the button should be disabled (i.e. will not react to user input)
- isDisabled
-
Returns true if the button is disabled
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 363:
You forgot a '=back' before '=head1'