CSSuiTextArea¶
- CSSuiTextArea()¶
CSSUITEXTAREA CSS-styled multiline text area backed by uihtml
- Usage:
ta = CSSuiTextArea(parent, ‘Placeholder’, ‘Enter notes…’) ta.ValueChangedFcn = @(s,e) disp(e.Value); ta.ValueChangingFcn = @(s,e) disp(e.Value); ta.add(‘line’); ta.addnl(‘another line’);
- Inputs:
parent : graphics container – required
- Name-Value Pairs:
‘Value’ : char - text content (default: ‘’) ‘Placeholder’ : char - hint text when empty (default: ‘’) ‘Label’ : char - header label above the text area (default: ‘’) ‘Editable’ : logical - false = read-only (default: true) ‘Scroll’ : logical - show scrollbar on overflow (default: false) ‘WordWrap’ : logical - wrap long lines (default: true) ‘MaxLines’ : integer - max lines kept in buffer, 0 = unlimited (default: 5000) ‘ValueChangedFcn’ : function handle - @(src, evt) on blur (default: []) ‘ValueChangingFcn’ : function handle - @(src, evt) on each keystroke (default: []) (plus all CSSBase name-value pairs)
- Outputs:
ta : CSSuiTextArea handle
Notes
Convenience methods: ta.add(str) (append), ta.addnl(str) (newline + append). Use sprintf or newline() to embed line breaks in Value.
- CSS element schema:
- #css-root Outer sizing container
.cssui-textarea Widget-type class on #css-root .css-label Header label div (when Label is set) textarea#ta.css-control The <textarea> element
.css-disabled On #css-root when Enabled=false
See also: CSSBase, CSSPreset, CSSuiEditField
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿