From: Mayi DA on
Dear all
When I plot something in a figure, there is a toolbar shown in the top of the figure, which contains 'Zoom in', 'Zoom out', 'pan' and so on. As for my application, I do not need all the items, so I want to customize this figure toolbar and just use some of these items. Can I cusstomize figure toolbar?

Best Regards
mayi
2010-07-17
From: Jan Simon on
Dear Mayi,

> When I plot something in a figure, there is a toolbar shown in the top of the figure, which contains 'Zoom in', 'Zoom out', 'pan' and so on. As for my application, I do not need all the items, so I want to customize this figure toolbar and just use some of these items. Can I cusstomize figure toolbar?

The easiest way would be to accept the existence of the standard buttons in the toolbar, because users are familiar with them and it is always recommended to present a well known environment to users.

Another idea would be to create a new toolbar with the command UITOOLBAR, UITOGGLETOOL and UIPUSHTOOL. Nevertheless, these commands are (have not been until 2009a) not documented and may change in a future release. But e.g. the demos of Matlab use them often. Just search in the toolbox files for "uitoggletool" etc. and you find some nice examples.

Good luck, Jan
From: Steven_Lord on


"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message
news:i1s3l6$rdo$1(a)fred.mathworks.com...
> Dear Mayi,
>
>> When I plot something in a figure, there is a toolbar shown in the top of
>> the figure, which contains 'Zoom in', 'Zoom out', 'pan' and so on. As for
>> my application, I do not need all the items, so I want to customize this
>> figure toolbar and just use some of these items. Can I cusstomize figure
>> toolbar?
>
> The easiest way would be to accept the existence of the standard buttons
> in the toolbar, because users are familiar with them and it is always
> recommended to present a well known environment to users.
>
> Another idea would be to create a new toolbar with the command UITOOLBAR,
> UITOGGLETOOL and UIPUSHTOOL. Nevertheless, these commands are (have not
> been until 2009a) not documented and may change in a future release. But
> e.g. the demos of Matlab use them often. Just search in the toolbox files
> for "uitoggletool" etc. and you find some nice examples.

If the OP is laying out their GUI using GUIDE, they could use the Toolbar
Editor:

http://www.mathworks.com/access/helpdesk/help/techdoc/creating_guis/f8-998378.html

This was introduced in MATLAB 7.5 (release R2007b):

http://www.mathworks.com/access/helpdesk/help/techdoc/rn/bq9954l-1.html

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com