How to set i checkbox to true in MATLAB gui?

I need to set the default checkbox to create gui. How can this be done in MATLAB? I easily inspected the uicontrol inspector.

+3
source share
3 answers

You can also set it in the open function (or with another callback) by inserting the following line:

set(handles.checkbox1,'Value',1);

or replace 'checkbox1' with any tag that you have assigned to your checkbox. To uncheck the box, simply set the value to zero. Thus, if you have two mutually exclusive options, when you select one, you can automatically deselect the other:

+9
source

. . "" "1". uicontrol. , , ?

+2

You can set the state of the checkbox during creation using the "Value" property:

uicontrol(..., 'Value', 1);
+2
source

Source: https://habr.com/ru/post/1730201/


All Articles