Restore toolbar buttons to app after migration from GUIDE

4 ビュー (過去 30 日間)
Matt J
Matt J 2021 年 11 月 22 日
回答済み: Matt J 2021 年 12 月 4 日
After using the Guide-to-AppDesigner migration tool, my app no longer has the standard figure toolbar buttons in the app figure window. Moreover, since the figure has now become a uifigure, it seems impossible to give it a toolbar (correct me if I'm wrong).
The app does contain a uiaxes, and I'd be satisfied if I could have a standard toolbar local to this uiaxes. However, the uiaxes.Toolbar property is empty, perhaps as a side-effect of the migration tool. When I attempt to install the toolbar manually with this line,
handles.ImageAxes.Toolbar=axtoolbar(handles.ImageAxes,'default');
in the OpeningFcn created by the migration tool, the toolbar does indeed appear (see below), but is completely non-functional. None of the buttons do anything. This may be because axtoolbar creates the buttons but does not (correct me if I'm wrong) populate the buttons with their standard callbacks. Is there a simple way to install a fully functional default toolbar in a uiaxes or uifigure?
  1 件のコメント
Matt J
Matt J 2021 年 11 月 23 日
A possibly related problem is that when I open the attached mlapp in appdesigner's Design VIew and activite the "Toolbar Visible" checkbox for the UIAxes, it does not stay checked. If I save and reopen the app, the "Toolbar Visible" checkbox is unchecked again. Are there rules about toolbars in app components that I just don't understand ???

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

回答 (1 件)

Matt J
Matt J 2021 年 12 月 4 日
Mathworks Tech Support claims this has been fixed in R2020b.

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by