Back to the Packages
Constructor
new Win32::GUI::Listbox(PARENT, %OPTIONS)
Methods
Add(STRING, STRING .. STRING)
AddString(STRING)
Clear()
Count()
FindString(STRING, [INDEX])
FindStringExact(STRING, [INDEX])
FirstVisibleItem([INDEX])
GetString(INDEX)
InsertItem(STRING, [INDEX])
ItemFromPoint(X, Y)
ItemHeight([HEIGHT])
ListIndex()
RemoveItem(INDEX)
Reset()
Select(INDEX)
SelectCount()
SelectedItem()
SelectedItems()
SelectString(STRING, [INDEX])
Events
Click()
DblClick()
GotFocus()
LostFocus()
Creates a new Listbox object; can also be called as PARENT->AddListbox(%OPTIONS). Class specific %OPTIONS are:
-multisel => 0/1/2 (default 0) specifies the selection type: 0 single selection 1 multiple selection 2 multiple selection ehnanced (with Shift, Control, etc.) -sort => 0/1 (default 0) items are sorted alphabetically.
Adds one or more items at the end of the control's list.
AddString(STRING) Adds an item at the end of the Listbox. Clear() See Reset(). Count() Returns the number of items in the Listbox. FindString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FindStringExact(STRING, [INDEX]) Searches the Listbox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FirstVisibleItem([INDEX]) Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX. GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Adds an item at the end of the Listbox.
Clear() See Reset(). Count() Returns the number of items in the Listbox. FindString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FindStringExact(STRING, [INDEX]) Searches the Listbox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FirstVisibleItem([INDEX]) Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX. GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
See Reset().
Count() Returns the number of items in the Listbox. FindString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FindStringExact(STRING, [INDEX]) Searches the Listbox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FirstVisibleItem([INDEX]) Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX. GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Returns the number of items in the Listbox.
FindString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FindStringExact(STRING, [INDEX]) Searches the Listbox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FirstVisibleItem([INDEX]) Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX. GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Searches the Listbox for an item that begins with the specified STRING. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found.
FindStringExact(STRING, [INDEX]) Searches the Listbox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found. FirstVisibleItem([INDEX]) Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX. GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Searches the Listbox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found.
FirstVisibleItem([INDEX]) Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX. GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Gets the zero-based index of the first visible item in the Listbox, or sets it to the specified INDEX.
GetString(INDEX) Returns the string at the specified zero-based INDEX in the Listbox. InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Returns the string at the specified zero-based INDEX in the Listbox.
InsertItem(STRING, [INDEX]) Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified. ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Inserts an item at the specified zero-based INDEX in the Listbox, or adds it at the end if INDEX is not specified.
ItemFromPoint(X, Y) Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside. ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Returns the zero-based index of the item nearest to the specified point; if called in a list context, returns an additional element which is TRUE if the point is inside the Listbox area, FALSE if it's outside.
ItemHeight([HEIGHT]) Gets or sets the items height in a Listbox. ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Gets or sets the items height in a Listbox.
ListIndex() See SelectedItem(). RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
See SelectedItem().
RemoveItem(INDEX) Removes the zero-based INDEX item from the Listbox. Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Removes the zero-based INDEX item from the Listbox.
Reset() Deletes the content of the Listbox. Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Deletes the content of the Listbox.
Select(INDEX) Selects the zero-based INDEX item in the Listbox. SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Selects the zero-based INDEX item in the Listbox.
SelectCount() Returns the number of selected items in a multiple selection Listbox. SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Returns the number of selected items in a multiple selection Listbox.
SelectedItem() Returns the zero-based index of the currently selected item, or -1 if no item is selected. SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Returns the zero-based index of the currently selected item, or -1 if no item is selected.
SelectedItems() Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox. SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox.
SelectString(STRING, [INDEX]) Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
Searches the Listbox for an item that begins with the specified STRING and, if found, selects that item. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the selected item or -1 if no matching item was found.
[TBD]
DblClick() Sent when the user double clicks on the control. GotFocus() Sent when the control is activated. LostFocus() Sent when the control is deactivated.
Sent when the user double clicks on the control.
GotFocus() Sent when the control is activated. LostFocus() Sent when the control is deactivated.
Sent when the control is activated.
LostFocus() Sent when the control is deactivated.
Sent when the control is deactivated.
3 POD Errors
The following errors were encountered while parsing the POD:
You can't have =items (as at line 135) unless the first thing after the =over is an =item
You can't have =items (as at line 159) unless the first thing after the =over is an =item
You can't have =items (as at line 337) unless the first thing after the =over is an =item
To install Win32::GUI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::GUI
CPAN shell
perl -MCPAN -e shell install Win32::GUI
For more information on module installation, please visit the detailed CPAN module installation guide.