007 – Chech Box (Matlab Gui)


Matlab GUI – Grafiksel Kullanıcı Arayüzü Dersleri

Ders: 007 – Matlab Gui Check Box

Matlab GUI tasarım araçlarından Check Box aracımızı detaylandırdığım video.
Burak Can KARA

Check Box

This code is an example of a check box callback function in GUIDE. Associate this function with the check box Callback property to make it execute when the end user clicks on the check box.

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)

% Hint: get(hObject,'Value') returns toggle state of checkbox1

if (get(hObject,'Value') == get(hObject,'Max'))
	display('Not selected');

The check box’s Value property matches the Min property when the check box is not selected. The Value changes to the Max value when the check box is selected. This callback function gets the check box’s Value property and then compares it with the Max and Minproperties. If the check box is selected, the function displays 'Selected' in the Command Window. If the check box is not selected, it displays 'Not selected'.

Kimler Neler Demiş?


This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Abone Ol  
Bildirim Al