Toolbar function still active when it's deselected

1 回表示 (過去 30 日間)
Lang
Lang 2022 年 4 月 2 日
編集済み: Esha Chakraborty 2022 年 4 月 6 日
In my App, I create an axis toolbar at the OpeningFcn using
app.HANDLES.Toolbar=axtoolbar(app.UIAxis,'default');
I want another graphical interaction function to be activated after user have adjusted (pan/zoom in/out) the axis using toolbar functions. Therefore, I need to deactivate the toolbar function first. I have the following lines for this purpose:
% turn off any active Toolbar function
for i=2:6 % except 1 (export dropdown) and 7 (restore view)
app.HANDLES.Toolbar.Children(i).Value='off';
end
However, the deselection does not actually deactivate the toolbar function. Does anyone have any suggestions for this?
Thanks!
Lang

回答 (1 件)

Esha Chakraborty
Esha Chakraborty 2022 年 4 月 5 日
編集済み: Esha Chakraborty 2022 年 4 月 6 日
Hi Lang,
I understand that you want to turn off the visbility of the toolbar in your App.
A possible workaround is to 'reset' the Toolbar Handle Visibility after creating a plot in the UI Axes component like:
app.UIAxes.Toolbar.HandleVisibility = 'on'
app.UIAxes.Toolbar.HandleVisibility = 'off'
Another way can be using the following command and trying to determine if the issue is resolved:
app.UI_Axes.Toolbar.Visible = 'off'
You can find a similar example in the following link:

カテゴリ

Help Center および File ExchangeInstall Products についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by