007 – Chech Box (Matlab Gui)

0
327

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
burakcankara@gmail.com

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('Selected');
else
	display('Not selected');
end

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'.

Advertisement
Önceki İçerik006 – Radio Button (Matlab Gui)
Sonraki İçerikUydu Görüntülerinde Mekansal Çözünürlüklerin Karşılaştırılması
Abone Ol
Bildirim Al
guest

Bu site, istenmeyenleri azaltmak için Akismet kullanıyor. Yorum verilerinizin nasıl işlendiği hakkında daha fazla bilgi edinin.

0 Yorum
Satıriçi Geribildirimi
Tüm yorumları göster.