Win32::GUI::Combobox - Create and manipulate combobox controls
[TBD]
Common methods apply to most windows, controls and resources.
new(PARENT, %OPTIONS)
Creates a new Combobox object; can also be called as PARENT->AddCombobox(%OPTIONS).
Class specific %OPTIONS are:
-autohscroll => 0/1 (default 0) Set/Unset autohscroll style -disablenoscroll => 0/1 (default 0) Set/Unset disablenoscroll style -dropdown => 0/1 (default 0) Set/Unset dropdown style -dropdownlist => 0/1 (default 0) Set/Unset dropdownlist style -hasstring => 0/1 (default 0) Set/Unset hasstring style -lowercase => 0/1 (default 0) Set/Unset lowercase style -nointegraleheight => 0/1 (default 0) Set/Unset nointegraleheight style -simple => 0/1 (default 0) Set/Unset simple style -sort => 0/1 (default 0) Set/Unset sort style -uppercase => 0/1 (default 0) Set/Unset uppercase style
Only one of -simple, -dropdown and -dropdownlist should be used. If more than one is used, only the last one will be acted on.
See also the common options.
Add(STRING, STRING .. STRING)
Adds one or more items at the end of the control's list.
AddString(STRING)
Adds an item at the end of the control's list.
Clear()
See ResetContent()
Count()
Return the number of items.
DeleteString(INDEX)
Removes the zero-based INDEX item from the Combobox.
Dir(PATH, [FLAG])
Add a list of filenames.
FindString(STRING, [INDEX])
Search item beginning with specified string.
FindStringExact(STRING, [INDEX])
Search item that match specified string.
FirstVisibleItem([INDEX])
See TopIndex()
GetCount()
See Count()
GetCurSel()
Returns the zero-based index of the currently selected item, or -1 if no item is selected.
GetDroppedControlRect()
Retrieves screen coordinates of the drop-down list box.
GetDroppedState()
Determine whether the list box of a combo box is dropped down.
GetDroppedWidth()
Retrieve the minimum allowable width, in pixels, of the list box af a Combobox with the CBS_DROPDOWN or CBS_DROPDOWNLIST style.
GetEditSel()
Get the starting and ending character positions of the current selection in the edit control of a Combobox.
GetExtendedUI()
Determine whether a combo box has the default user interface or the extended user interface.
GetHorizontalExtent()
Retrieve from a combo box the width, in pixels, by which the list box can be scrolled horizontally (the scrollable width).
GetItemHeight(INDEX)
Determine the height of list items or the selection field in a combo box.
GetLBText(INDEX)
Returns the string at the specified zero-based INDEX in the Combobox.
GetLBTextLen(INDEX)
Retrieve the length, in characters, of a string in the list of a combo box.
GetLocale()
Retrieve the current locale of the Combobox.
GetString(INDEX)
See GetLBText()
GetTopIndex()
Retrieve the zero-based index of the first visible item in the list box portion of a Combobox.
InitStorage(count,size)
Allocates memory for storing list box items.
InsertItem(STRING, [INDEX])
See InsertString()
InsertString(STRING, [INDEX])
Inserts an item at the specified zero-based INDEX in the Combobox, or adds it at the end if INDEX is not specified.
ItemHeight([HEIGHT])
Gets or sets the items height in a Combobox.
LimitText(SIZE)
Set limit of the text length the user may type into the Textfield of a Combobox.
ListIndex()
See GetCurSel()
RemoveItem(INDEX)
See DeleteString()
Reset()
ResetContent()
Remove all items from the Listbox and Textfield of a Combobox.
Select(INDEX)
See SetCurSel()
SelectedItem()
SelectString(STRING, [INDEX])
Search for an item that begins with the specified string in the Listbox. If a matching item is found, it is selected and copied to the Textfield.
SetCurSel(INDEX)
Selects the zero-based INDEX item in the Combobox.
SetDroppedWidth(WIDTH)
Set the maximum allowable width, in pixels, of the Listbox of a Combobox.
SetEditSel(START,END)
Select characters in the textfield. START and END are the (zero-based) index of the characters to be selected. START is the index of the first character to be selected, and END is the index of the first character following the selection. For example to select the first 4 characters:
$combobox->SetEditSel(0,4);
If START is -1, the any selection is removed. If END is -1, then the selection is from START to the last character in the textfield.
Returns 1 on success, 0 on failure and -1 if sent to a Combobox that does not have a textfield (-dropdownlist = 1>).
-dropdownlist =
SetExtendedUI(FLAG)
Select either the default user interface or the extended user interface for a Combobox.
SetHorizontalExtend(CX)
Set the width, in pixels, by which a listbox can be scrolled horizontally (the scrollable width).
SetItemHeight(INDEX,HEIGHT)
Set the height of list items or the selection field in a Combobox.
SetLocale(LOCALE)
Set the current locale of the Combobox.
SetTopIndex(INDEX)
Ensure that a particular item is visible in the Listbox of a Combobox.
ShowDropDown(FLAG)
Show or hide the Listbox of a Combobox.
TopIndex([INDEX])
Set or Get first visible item index.
Common events apply to most windows and controls.
Change()
Sent when the user selects an item from the Combobox
CloseUp()
Sent when the list box of a combo box has been closed. This event allows you to populate the dropdown dynamically. This event is only fired if the combo box has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.
If the user changed the current selection, the combo box also sends the Change event when the drop-down list closes. In general, you cannot predict the order in which notifications will be sent. In particular, a Change event message may occur either before or after a CloseUp event.
DblClick()
Sent when the user double clicks on an item from the Combobox
DropDown()
Sent when the user selects the list box. This event allows you to populate the dropdown dynamically. This event is only fired if the combo box has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.
GotFocus()
Sent when the control is activated.
LostFocus()
Sent when the control is deactivated.
Documentation for Win32::GUI v1.14 created 01 Jun 2017
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 from the website at http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users. There is a searchable list archive at http://sourceforge.net/p/perl-win32-gui/mailman/perl-win32-gui-users/.
Copyright (c) 1997..2017 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.
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.