CSSuiDropdown

CSSuiDropdown()

CSSUIDROPDOWN CSS-styled dropdown/select component backed by uihtml

Usage:

dd = CSSuiDropdown(parent, ‘Items’, {‘A’,’B’,’C’}) dd.Value = ‘B’; % live-patches without rebuild

Inputs:

parent : graphics container – required

Name-Value Pairs:

‘Items’ : cell - option strings (default: {‘Option 1’,’Option 2’}) ‘Value’ : char - currently selected string (default: Items{1}) ‘Label’ : char - adjacent text label (default: ‘’) ‘LabelSide’ : char - ‘left’ | ‘right’ (default: ‘left’) ‘DropdownWidth’ : char - CSS width of just the select (default: ‘’) ‘DropdownHeight’ : char - CSS height of just the select (default: ‘’) ‘ValueChangedFcn’ : function handle - @(src, evt) callback (default: []) (plus all CSSBase name-value pairs)

Outputs:

dd : CSSuiDropdown handle

Notes

CSS element schema:
#css-root Outer sizing container

.cssui-dropdown Widget-type class on #css-root .css-label Adjacent text label div (when Label is set) .css-control Dropdown surface wrapper

select#sel The native <select> element

.css-disabled On #css-root when Enabled=false

See also: CSSBase, CSSPreset, CSSuiListBox, CSSuiEditField

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿