How can I remove the option to close a figure in a ToolGroup?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Paras Gupta
el 14 de Sept. de 2023
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 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!