====== behavior: select-dropdown ======
''select-dropdown'' is what is known as //COMBOBOX// in Windows.
===== Elements =====
that have this behavior applied by default (see [[master style sheet]]):
* ''... ''
* '' ''
In h-smile '''' can have any arbitrary markup inside but following elements have special meaning:
* ''... '' - option element - item of the list.
* ''... '' - container of other ''option'' and/or ''options'' - node of the tree.
* ''... '' - container of ''option''s - grouping element.
===== Attributes =====
this behavior knows about:
* ''size="N"'' - number of visible itemsin the list.
* ''multiple'' - if defined allows to select more than one item.
* ''multiple="checks"'' - allows to select more than one item and ''''s rnedered with check marks.
===== Events =====
Besides of standard set of events (mouse, keyboard, focus) //behavior:select// generates:
* SELECT_SELECTION_CHANGED event - selection was changed due to user interaction.
* SELECT_STATE_CHANGED event - state of '''' (tree node) was changed: collapsed or expanded. Field //target// of event structure is a reference to the node element that was changed.
===== Value =====
* single selectable lists - value is value of the selected '''' - either content of //value// attribute or text of the '' ''.
* multi-selectable lists - value is an array of values of selected '' ''s.
===== Special key combinations =====
* LEFT - for nodes, collapse current node (''options'' element);
* RIGHT - for nodes, expand current node (''options'' element);
* UP / PAGE-UP - previous item;
* DOWN / PAGE-DOWN- next item;
* SHIFT + UP/PAGE-UP - same as above but with selection;
* SHIFT + UP/PAGE-DOWN - same as above but with selection;
* HOME - first item in the list;
* END - last item in the list;
You can override styles of the '''' and its content, see [[master style sheet]] and html_samples/forms/selects.htm and nearby.