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

NAME

IWL::Entry - a text entry widget

INHERITANCE

IWL::Error -> 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

PROPERTIES

text

The input text of the entry

image1

The left icon of the entry

image2

The right icon of the entry

SIGNALS

load

Fires when the entry has finished loading.

text_state_change

Fires when the entry text state has changed. It receives the new state of the entry as the second parameter.

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

setValue (VALUE, BLUR)

Sets the text of the entry, as well as the blur value, if any

Parameters: VALUE - the text of the entry, BLUR - the blur text of the entry, will appear if it is defined and the entry has lost focus

setText (TEXT)

Sets the text of the entry

Note: for setting both the text and blur value, see IWL::Entry::setValue

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)

Returns the set image

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)

Returns the set image

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

printCompletions (COMPLETION, ...)

Prints the supplied completions in a format, which is required for auto-completion.

This method is a class method! You do not need to instantiate an object in order to call it.

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-2008 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 524:

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