Query regarding toolbar in MATLAB App designer

What changes should I make in the app designer code to get this toolbar (refer picture below) in the final sharable application.? Please refer me to some guidelines in this regard.

 Accepted Answer

As far as I can tell, you must rebuild the toolbar using uitoolbar, uipushtool, and uitoggletool.

3 Comments

Thanks for responding.
I have defined a tool bar using
app.Toolbar = uitoolbar(app.UIFigure);
But it appears blank on running the code. I am unable to see these icons in the toolbar.
Found this unanswered question on a similar issue in MATLAB Central
Thankyou
Matt J
Matt J on 18 Aug 2022
Edited: Matt J on 18 Aug 2022
Because you must also recreate the buttons themselves with uipushtool, and uitoggletool.
I agree that this is tragically painful, but at the same time, it is not clear what else we could expect. The contents of a UIFigure are not as predictable as a conventional figure, so it is not clear what the behavior of the buttons should be in this case. What should the zoom button do when the UIFigure contains only a pushbutton or a slider?
Thanks for your response. Sounds logical. Will try to build up the tools.

Sign in to comment.

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Release

R2021b

Asked:

on 10 Aug 2022

Commented:

on 24 Aug 2022

Community Treasure Hunt

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

Start Hunting!