Borrar filtros
Borrar filtros

How do I get rid of the error "Functionality not supported with figures created with the uifigure function."

38 visualizaciones (últimos 30 días)
I added this line to my startup.m so that the zoom and marker tools are available on the toolbar by default
set(groot,'defaultFigureCreateFcn',@(fig,~)addToolbarExplorationButtons(fig))
but recently I have started getting the error
"Functionality not supported with figures created with the uifigure function."
when I create a uifigure.
How can I fix this?

Respuesta aceptada

Michael
Michael el 10 de Mayo de 2024
I found a solution.
Change the line in startup.m to this:
set(groot,'defaultFigureCreateFcn',@(fig,~)addToolbarExplorationButtons(fig(~matlab.ui.internal.isUIFigure(fig))));
The function matlab.ui.internal.isUIFigure() test if the figure is a uifigure so this way it calls addToolbarExplorationButtons with a pointer to an empty figure if the test for a uifigure is true and to the desired figure if it is false.

Más respuestas (0)

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by