CSSuiEditField¶
- CSSuiEditField()¶
CSSUIEDITFIELD CSS-styled single-line text edit field backed by uihtml
- Usage:
ef = CSSuiEditField(parent, ‘Placeholder’, ‘Enter name…’) ef = CSSuiEditField(parent, ‘Value’, ‘hello’, ‘Style’, ‘shadow’) ef.ValueChangedFcn = @(s,e) disp(e.Value);
- Inputs:
parent : ui container - parent (default: new uifigure)
- Name-Value Pairs:
‘Position’ : 1x4 double - [x y w h] (default: [10 10 200 36]) ‘Enabled’ : logical - enable interaction (default: true) ‘TempDir’ : char - scratch dir (default: tempdir()) ‘Style’ : char - CSSBase style preset (default: ‘’) ‘CSS’ : char - extra CSS (default: ‘’) ‘CSSFile’ : char - extra CSS file (default: ‘’) ‘Value’ : char - initial text content (default: ‘’) ‘Placeholder’ : char - hint text when empty (default: ‘’) ‘Label’ : char - adjacent text label (default: ‘’) ‘LabelSide’ : char - ‘left’ or ‘right’ (default: ‘left’) ‘Editable’ : logical - false = read-only (default: true) ‘ValueChangedFcn’ : @(src, evt) on Enter / focus-out (default: []) ‘ValueChangingFcn’ : @(src, evt) on every keystroke (default: []) Additional CSS convenience properties are forwarded to CSSBase (Color, BackgroundColor, FontSize, Padding, BorderRadius, etc.).
- Outputs:
ef : CSSuiEditField handle
Notes
- CSS element schema:
- #css-root Outer sizing container (CSSBase-managed)
.cssui-edit Widget-type class on #css-root .css-label Adjacent text label div (when Label is set) .css-control Input surface wrapper (bg / shadow)
input#inp The <input> element (transparent bg)
.css-disabled On #css-root when Enabled=false
Example
ef.CSS = ‘.css-control { border: 2px solid #1976D2; }’; ef.CSS = ‘.css-label { font-style: italic; }’; ef.CSS = ‘input { text-align: right; }’;
See also: CSSBase, CSSuiListBox, CSSuiTable
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿