Effacer les filtres
Effacer les filtres

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

55 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

Michael
Michael le 10 Mai 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.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by