adding toolbar and menubar to figure in appdesigner

48 次查看(过去 30 天)
Hello house< I am trying to add toolbar to a figure in matlab with appdesigner, I have coded most of the examples shown on the appdesigner editor, its not just working. please I need assistance on this:
I have tried this method:
app.p = app.uifigure;
app.m = app.uimenu(app.p);
app.m.Text = 'Open Selection';
its not working
I have also tired this
app.t = app.UIFigure;
addToolbarExplorationButtons(app.t)
None is working.

采纳的回答

Abhilash Padma
Abhilash Padma 2019-7-29
Hi,
For now, app designer does not support toolbar. However, you can explore tab groups if it suits your use case. You can add menu bar and tab group to your app using app designer by dragging Menu Bar and Tab Group from Component Library and dropping it on the app in design view of the app. Refer the following links to get more information about menu bar and tab group:

更多回答(1 个)

Ajay Pattassery
Ajay Pattassery 2020-4-24
Toolbar can be added programatically to app designer using uitoolbar function from MATLAB R2020a ownwards.
Refer here for more information.
  1 个评论
Sreerup Banerjee
Sreerup Banerjee 2020-7-29
If I use a local function in the App Designer as callback for the pushbuttons or togglebuttons inside the toobar, it is giving error:
Undefined function 'myfcn' for input arguments of type 'matlab.ui.container.toolbar.PushTool'.
Error using matlab.ui.internal.controller.WebPushToolController/fireActionEvent (line 116)
Error while evaluating PushTool ClickedCallback.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by