FUNCTION REFERENCE
uicontrol
Create a classic user interface control in a figure.
Create a classic user interface control in a figure.
Syntax
c = uicontrolSyntax
c = uicontrol(Name, Value)Syntax
c = uicontrol(parent, Name, Value)Supports Style 'pushbutton' (default), 'togglebutton', 'edit', 'text', 'slider', 'checkbox', 'radiobutton', 'popupmenu', and 'listbox', with String, Value, Min, Max, Position, Units ('pixels', 'normalized'), Callback, Enable, Visible, Tag, UserData, BackgroundColor, ForegroundColor, FontSize, HorizontalAlignment, and Tooltip/TooltipString.
Example
fig = figure('Visible', 'off'); b = uicontrol(fig, 'Style', 'pushbutton', 'String', 'Go', 'Tag', 'go'); b.String; close(fig)Differences from MATLAB: 'frame' style, reparenting after creation, Units other than 'pixels' and 'normalized', and GUIDE .fig files are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.