matlab的gui设计中如何实现点击按钮"取消"然后清空编辑框中的内容

2025-02-26 19:27:33
推荐回答(1个)
回答1:

button3=questdlg('你确定退出吗?','退出程序','确定','取消','确定');
if
strcmp(button3,'Yes')
set(handles.edit1,
'String',
'
');%%最后的2个单引号,中间的内容是空哦,也就是清空
end;