Filter löschen
Filter löschen

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

52 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

Michael
Michael am 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.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by