How can I remove the option to close a figure in a ToolGroup?
1 回表示 (過去 30 日間)
古いコメントを表示
With the snippet of code below I can create a nice looking interface and a figure in which I can create all sorts of controls. However, I'd like to remove the option to close the figure inside it. Is there a way that I can remove the figure title and close button? It's essentially the look the ToolGroup has if there are no figures added.
hToolGroup = matlab.ui.internal.desktop.ToolGroup('MWE');
hToolGroup.disableDataBrowser();
hToolGroup.open();
fig = figure;
hToolGroup.addFigure(fig);
uicontrol(fig, ...
'Style', 'edit', ...
'String', 'A minimal working example' ...
)
0 件のコメント
回答 (1 件)
Paras Gupta
2023 年 9 月 14 日
Hi,
I understand that you want to hide/remove the close button from the UI Figure tab in the Tool Group created using the provided code.
In MATLAB, there is no built-in way to hide the close button. We can, however, specify the behavior when the close button is pressed by modifying the CloseRequestFcn callback of the created UI Figure. Please refer to the following documentation to learn more about the same.
If you need to have more control over the appearance and behavior of the figure's tab, you might consider creating a custom UI using MATLAB's App Designer. Please refer to the following documentation to gain a comprehensive understanding of App Designer and its functionalities
Hope this helps.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!