NAME
IWL::Entry - a text entry widget
INHERITANCE
IWL::Object -> IWL::Widget -> IWL::Input -> IWL::Entry
DESCRIPTION
The entry widget is a single-line, text entry, also capable of showing password-type fields.
CONSTRUCTOR
IWL::Entry->new ([%ARGS])
Where %ARGS is an optional hash parameter with with key-values. password: set to true if the entry is a password field. readonly: set to true if the entry is read-only text: set to whatever string should be shown as a default maxlength: the maximum number of characters the entry can hold
NOTES
Since the Entry is a compound object, settings the class and the id will also set the above to the components of the Entry. They will automatically obtain a suffix of "_image1" for the left image, "_image2" for the right image, and "_text" for the text control.
PROPERTIES
- image1
-
The left icon of the entry
- image2
-
The right icon of the entry
METHODS
- setPassword (BOOL)
-
Sets whether the type of the entry is a password type
Parameter: BOOL - a boolean value.
- isPassword
-
Returns true if the entry is a password type
- setReadonly (BOOL)
-
Sets whether the type of the entry is read-only
Parameter: BOOL - a boolean value.
- isReadonly
-
Returns true if the entry is a read-only
- setText (TEXT)
-
Sets the text of the entry
Parameter: TEXT - the text.
- getText
-
Returns the text of the entry
- setDefaultText (TEXT)
-
Sets the default text of the entry
Parameter: TEXT - the text.
- getDefaultText
-
Returns the default text of the entry
- setMaxLength (NUM)
-
Sets the maximum character length of the entry
Parameter: NUM - a number.
- getMaxLength
-
Returns the maximum character length of the entry
- setSize (NUM)
-
Sets the size of the entry field
Parameter: NUM - a number.
- getSize
-
Returns the size of the entry field
- setIcon (SRC, [ALT, POSITION, CLICKABLE])
-
Sets the icon that is shown in the entry
Parameters: SRC - the source of the image, ALT - the alternate text of the image, POSITION - the icon position, either "left", or "right" (default: "left"), CLICKABLE - true if the icon is clickable (sets the cursor)
- setIconFromStock (STOCK_ID, [POSITION, CLICKABLE])
-
Sets the icon that is shown in the entry, from a stock image
Parameters: STOCK_ID - the stock id of the image, POSITION - the icon position, either "left", or "right" (default: "left"), CLICKABLE - true if the icon is clickable (sets the cursor)
- addClearButton
-
A wrapper function that adds a clear button to the end of the entry
- setAutoComplete (URL, [%OPTIONS])
-
Adds auto-completion for the entry
Parameters: URL - the url of the destination script, %OPTIONS - a hash with the following options: paramName - the name of the parameter, which will hold the currently written string minChars - the minimum number of typed character, in order to invoke an ajax call indicator - id of an element to be shown, during the ajax call
- setId (ID, [CONTROL_ID])
-
Sets the id of the entry and all of it's parts. Can optionally set the id of the control.
Parameters: ID - the id of the entry, CONTROL_ID - the id of the text control, optional
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 503:
You forgot a '=back' before '=head1'