Quantcast
Viewing latest article 7
Browse Latest Browse All 18

Setting GUI Checkbox Defaute value by global variable

Hi,

I'm making my own GUI, use checkbox and edit text.
what i want to do is using global variable to default value .

ex)
function checkbox1_Callback(hObject, eventdata, handles)
% hObject handle to checkbox1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global a
set(handles.checkbox1,'Value',a)

but when i start the GUI checkbox's value still 0 , pressing checkbox then value change 1 and don't back 0

this problem same as edit text ..

i want set default value by not using inspector . thanks for reading,

Viewing latest article 7
Browse Latest Browse All 18

Trending Articles