image thumbnail

CLICKUICONTROL

version 1.1.0.1 (3.83 KB) by Jiro Doke
Emulates clicking on a UIcontrol object.

2.9K Downloads

Updated 01 Sep 2016

View License

CLICKUICONTROL(H) behaves as if clicking on a UIControl object. The object can be one of the following: pushbutton, checkbox, radiobutton, togglebutton, slider, listbox, popupmenu. The Value property of the object will be appropriately set, and the object's Callback is called (ButtonDownFcn will be called if the object's Enable property is set to OFF or INACTIVE). It will work with callbacks defined as strings or function handles. The UICONTROL will not be brought to focus.
CLICKUICONTROL(H, 'focus') brings focus to the object. This is useful for bringing focus to an EDIT box. Default is 'nofocus'.

CLICKUICONTROL(H, OPT) or CLICKUICONTROL(H, 'focus', OPT). Some objects accept a additional argument OPT. Acceptable arguments are dependent on the style of UIControl object.

SLIDER:
'-' : Click on the decreasing arrow.
'+' : Click on the increasing arrow.
'--' : Click on the decreasing slider trough.
'++' : Click on the increasing slider trough.
'.' : Click without change of value.

LISTBOX:
'top' : Select the top-most element.
'end' : Select the last element.
'+' : Select the next element.
'-' : Select the previous element.
'.' : Select the current element.
N : Select the N-th element.
Can also be an array if multi
selection is permitted.

POPUPMENU:
'top' : Select the top-most element.
'end' : Select the last element.
'+' : Select the next element.
'-' : Select the previous element.
'.' : Select the current element.
N : Select the N-th element.

Cite As

Jiro Doke (2022). CLICKUICONTROL (https://www.mathworks.com/matlabcentral/fileexchange/8926-clickuicontrol), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP2
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!