how to close uipanel base on click on pushbutton

5 次查看(过去 30 天)
how to close uipanel base on click on pushbutton
a6=uicontrol('parent', handles.hsp,'Style','pushbutton','FontSize',11,'FontWeight','bold', ...
'position',[5 20 60 20],'string','close','Callback',@mycloseFunction);

采纳的回答

Walter Roberson
Walter Roberson 2017-9-18
outer = uipanel()
inner = uipanel('Parent', outer)
but = uicontrol('style', 'push', 'Callback', @(src, event) delete(outer) )
  1 个评论
praveen chandaliya
praveen chandaliya 2017-9-18
Thanks Walter this code working properly... if any one required to close figure than also close using this way only pass delete(hFig)..

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by