[TBD]
Common methods apply to most windows, controls and resources.
new(PARENT, %OPTIONS)
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. -multicolumn => 0/1 (default 0) -nointegralheight => 0/1 (default 0) -noredraw => 0/1 (default 0) -notify => 0/1 (default 0) -usetabstop => 0/1 (default 0) -disablenoscroll => 0/1 (default 0)
See also the common options.
Add(STRING, STRING .. STRING)
Add multiple string.
AddFile(STRING)
Add the specified filename to a list box that contains a directory listing.
AddString(STRING)
Add a string to a Listbox.
Count()
See GetCount()
DeleteString(index)
Removes the zero-based INDEX item from the Listbox.
Dir(string,flag)
Add a list of filenames to a Listbox.
FindString(STRING, [INDEX])
Find the first string in a list box that contains the specified prefix.
FindStringExact(STRING, [INDEX])
Find the first Listbox string that matches the specified string.
FirstVisibleItem([INDEX])
Set or Get first visible item.
GetAnchorIndex()
Retrieve the index of the anchor item.
GetCaretIndex()
Determine the index of the item that has the focus rectangle in a multiple-selection Listbox.
GetCount()
Returns the number of items in the Listbox.
GetCurSel()
Retrieve the index of the currently selected item, if any, in a single-selection Listbox.
GetHorizontalExtent()
Retrieve from a list box the width, in pixels, by which the Listbox can be scrolled horizontally (the scrollable width) if the list box has a horizontal scroll bar.
GetItemHeight(index)
Retrieve the height of items in a Listbox.
GetItemRect(index)
Retrieve the dimensions of the rectangle that bounds a Listbox item as it is currently displayed in the Listbox.
GetLocale()
Retrieve the current locale of the Listbox.
GetSel(index)
Retrieve the selection state of an item.
GetSelCount()
Retrieve the total number of selected items in a multiple-selection Listbox.
GetSelItems()
Returns an array containing the zero-based indexes of the selected items in a multiple selection Listbox.
GetString(INDEX)
See GetText()
GetText(INDEX)
Returns the string at the specified zero-based INDEX in the Listbox.
GetTextLen()
Retrieve the length of a string in a Listbox.
GetTopIndex()
Retrieve the index of the first visible item in a Listbox.
InsertItem(STRING, [INDEX])
See InsertString()
InsertString(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.
Item(INDEX)
Return an Listbox::Item.
ItemFromPoint(X, Y)
Retrieve the zero-based index of the item nearest the specified point in a Listbox.
ItemHeight([HEIGHT])
Gets or sets the items height in a Listbox.
List()
Return a list of Listbox::Item.
RemoveItem(index)
See DeleteString()
ResetContent()
Remove all items from a Listbox.
Select(INDEX)
See SetCurSel()
SelectCount()
See GetSelCount()
SelectedItem()
See GetCurSel()
SelectedItems()
See GetSelItems()
SelectString(STRING, [INDEX])
Search in a Listbox for an item that begins with the characters in a specified string. If a matching item is found, the item is selected.
SelItemRange(FIRST,LAST,[FLAG=TRUE])
Select one or more consecutive items in a multiple-selection Listbox.
SelItemRangeEx(FIRST,LAST)
Select one or more consecutive items in a multiple-selection Listbox.
SetAnchorIndex(index)
Set the anchor item that is, the item from which a multiple selection starts. A multiple selection spans all items from the anchor item to the caret item.
SetCaretIndex(index)
Set the focus rectangle to the item at the specified index in a multiple-selection Listbox. If the item is not visible, it is scrolled into view.
SetColumnWidth(Width)
Set the width, in pixels, of all columns in a multi-column Listbox.
SetCount(Count)
Set the count of items in a Listbox.
SetCurSel(INDEX)
Selects the zero-based INDEX item in the Listbox. Can only be used with single selection listboxes. For multiple-selection listboxes see SetSel().
SetHorizontalExtent(cxExtent)
Set the width, in pixels, by which a Listbox can be scrolled horizontally.
SetItemHeight(Height)
Set the height, in pixels, of items in a Listbox.
SetLocal(local)
Set the current locale of the Listbox.
SetSel(index,[FLAG=TRUE])
Select a string in a multiple-selection Listbox.
SetTabStops(...)
Set the tab-stop positions in a Listbox.
SetTopIndex(index)
Ensure that a particular item in a Listbox is visible.
Common events apply to most windows and controls.
Click()
DEPRECATED use SelChange event.
DblClick()
Sent when the user double clicks on the control.
GotFocus()
Sent when the control is activated.
LostFocus()
Sent when the control is deactivated.
SelCancel()
Sent when the user cancels the selection in a Listbox.
SelChange()
[TBD]
Documentation for Win32::GUI v1.06 created 13 Feb 2008
This document is autogenerated by the build process. Edits made here will be lost. Edit docs/per_package.tpl instead.
Homepage: http://perl-win32-gui.sourceforge.net/.
For further support join the users mailing list(perl-win32-gui-users@lists.sourceforge.net
) from the website
at http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users. There is a searchable list archive at http://sourceforge.net/mail/.
Copyright (c) 1997..2008 Aldo Calpini. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.