0
不使用GUIDE如何在按下按鈕後獲得編輯uicontrol的值?以編程方式從MATLAB獲取GUI數據(不含GUIDE)
實施例:
fig = figure;
input = uicontrol(fig, 'Style', 'edit', 'Tag', 'input');
btn = uicontrol(fig, 'Style', 'pushbutton', 'Callback', @obj.test);
在我的類
然後
methods
function testing(src, event, handles)
msgbox(get(handles.input, 'string'));
end
end
Doh!簡單的修復我忽略了。感謝您的幫助,它完美的工作! – Nick