フィルターのクリア

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

55 ビュー (過去 30 日間)
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?

採用された回答

Michael
Michael 2024 年 5 月 10 日
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.
  2 件のコメント
Lorenzo
Lorenzo 2024 年 5 月 13 日
Same problem,
thank you for the solution!
Craig
Craig 2024 年 6 月 27 日 14:31
Yes, Thank you very much for posting the solution

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by