matlab gui中,怎么置顶弹出的窗口

2025-04-06 06:07:54
推荐回答(1个)
回答1:

在callback里调用即可,例如按钮button1按下出现警告对话框

function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
msgbox('这是一个警告消息框','警告','warn');

用户不按确定是不会自动关闭的。