Azzera filtri
Azzera filtri

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

55 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Michael
Michael il 10 Mag 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.

Più risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by