NAME
Win32::GUI::Combobox - Create and manipulate combobox controls
DESCRIPTION
[TBD]
METHODS
Common methods apply to most windows, controls and resources.
new
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
Add(STRING, STRING .. STRING)
Adds one or more items at the end of the control's list.
AddString
AddString(STRING)
Adds an item at the end of the control's list.
Clear
Clear()
See ResetContent()
Count
Count()
Return the number of items.
DeleteString
DeleteString(INDEX)
Removes the zero-based INDEX item from the Combobox.
Dir
Dir(PATH, [FLAG])
Add a list of filenames.
FindString
FindString(STRING, [INDEX])
Search item beginning with specified string.
FindStringExact
FindStringExact(STRING, [INDEX])
Search item that match specified string.
FirstVisibleItem
FirstVisibleItem([INDEX])
See TopIndex()
GetCount
GetCount()
See Count()
GetCurSel
GetCurSel()
Returns the zero-based index of the currently selected item, or -1 if no item is selected.
GetDroppedControlRect
GetDroppedControlRect()
Retrieves screen coordinates of the drop-down list box.
GetDroppedState
GetDroppedState()
Determine whether the list box of a combo box is dropped down.
GetDroppedWidth
GetDroppedWidth()
Retrieve the minimum allowable width, in pixels, of the list box af a Combobox with the CBS_DROPDOWN or CBS_DROPDOWNLIST style.
GetEditSel
GetEditSel()
Get the starting and ending character positions of the current selection in the edit control of a Combobox.
GetExtendedUI
GetExtendedUI()
Determine whether a combo box has the default user interface or the extended user interface.
GetHorizontalExtent
GetHorizontalExtent()
Retrieve from a combo box the width, in pixels, by which the list box can be scrolled horizontally (the scrollable width).
GetItemHeight
GetItemHeight(INDEX)
Determine the height of list items or the selection field in a combo box.
GetLBText
GetLBText(INDEX)
Returns the string at the specified zero-based INDEX in the Combobox.
GetLBTextLen
GetLBTextLen(INDEX)
Retrieve the length, in characters, of a string in the list of a combo box.
GetLocale
GetLocale()
Retrieve the current locale of the Combobox.
GetString
GetString(INDEX)
See GetLBText()
GetTopIndex
GetTopIndex()
Retrieve the zero-based index of the first visible item in the list box portion of a Combobox.
InitStorage
InitStorage(count,size)
Allocates memory for storing list box items.
InsertItem
InsertItem(STRING, [INDEX])
See InsertString()
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
ItemHeight([HEIGHT])
Gets or sets the items height in a Combobox.
LimitText
LimitText(SIZE)
Set limit of the text length the user may type into the Textfield of a Combobox.
ListIndex
ListIndex()
See GetCurSel()
RemoveItem
RemoveItem(INDEX)
See DeleteString()
Reset
Reset()
See ResetContent()
ResetContent
ResetContent()
Remove all items from the Listbox and Textfield of a Combobox.
Select
Select(INDEX)
See SetCurSel()
SelectedItem
SelectedItem()
See GetCurSel()
SelectString
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
SetCurSel(INDEX)
Selects the zero-based INDEX item in the Combobox.
SetDroppedWidth
SetDroppedWidth(WIDTH)
Set the maximum allowable width, in pixels, of the Listbox of a Combobox.
SetEditSel
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>).
SetExtendedUI
SetExtendedUI(FLAG)
Select either the default user interface or the extended user interface for a Combobox.
SetHorizontalExtend
SetHorizontalExtend(CX)
Set the width, in pixels, by which a listbox can be scrolled horizontally (the scrollable width).
SetItemHeight
SetItemHeight(INDEX,HEIGHT)
Set the height of list items or the selection field in a Combobox.
SetLocale
SetLocale(LOCALE)
Set the current locale of the Combobox.
SetTopIndex
SetTopIndex(INDEX)
Ensure that a particular item is visible in the Listbox of a Combobox.
ShowDropDown
ShowDropDown(FLAG)
Show or hide the Listbox of a Combobox.
TopIndex
TopIndex([INDEX])
Set or Get first visible item index.
EVENTS
Common events apply to most windows and controls.
Change
Change()
Sent when the user selects an item from the Combobox
CloseUp
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
DblClick()
Sent when the user double clicks on an item from the Combobox
DropDown
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
GotFocus()
Sent when the control is activated.
LostFocus
LostFocus()
Sent when the control is deactivated.
VERSION
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.
SUPPORT
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 and LICENCE
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.