Prima::ComboBox - standard combo box widget |
Prima::ComboBox - standard combo box widget
Provides a combo box widget which consists of an input line, list box of possible selections and eventual drop-down button. The combo box can be either in form with a drop-down selection list, that is shown by the command of the user, or in form when the selection list is always visible.
The combo box is a grouping widget, and contains neither painting nor user-input
code. All such functionality is delegated into the children widgets: input line, list
box and button. Prima::ComboBox
exports a fixed list of methods and properties from
namespaces of the Prima::InputLine manpage and the Prima::ListBox manpage. Since, however, it is
possible to tweak the Prima::ComboBox
( using its editClass and listClass
create-only properties ) so the input line and list box would be other classes,
it is not necessarily that all default functionality would work.
The list of exported names is stored in package variables %listProps, %editProps
and %listDynas. These also described in Exported names section.
The module defines cs::
package for the constants used by style property.
use Prima::ComboBox;
my $combo = Prima::ComboBox-> create( style => cs::DropDown, items => [ 1 .. 10 ]); $combo-> style( cs::DropDownList ); print $combo-> text;
Create-only property.
Default value: Prima::Widget
Create-only property.
Create-only property.
Default value: 0
Create-only property.
Default value: Prima::InputLine
Create-only property.
Create-only property.
items
property. See the Prima::Lists manpage for details.
Create-only property.
Default value: Prima::ListBox
Default value: 100
cs::Simple
.
Create-only property.
Create-only property.
get_item_text
( see the Prima::Lists manpage ). As an example when
this property is set to 0 is Prima::ColorComboBox
from the Prima::ComboBox manpage package.
Default value: 1
cs::DropDown
, but the user is restricted in the selection:
the input line can only accept user input that is contained in listbox.
If literal set to 1, the auto completion feature is provided.
text
property.
alignment autoScroll text text charOffset maxLen insertMode firstChar selection selStart selEnd writeOnly copy cut delete paste wordDelimiters readOnly passwordChar focus select_all
autoHeight focusedItem hScroll integralHeight items itemHeight topItem vScroll gridColor multiColumn offset
onDrawItem onSelectItem
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima, the Prima::InputLine manpage, the Prima::Lists manpage, the Prima::ColorDialog manpage, the Prima::FileDialog manpage, examples/listbox.pl.
Prima::ComboBox - standard combo box widget |