From: Subrahmanya Shettigar on
i have set the toolbar property of gui to figure.
but it displays all the tools available. is it possible to display only zoom in zoomout rotate properties of figure


thank you in advance

subrahmanya
From: Jan Simon on
Dear Subrahmanya,

> i have set the toolbar property of gui to figure.
> but it displays all the tools available. is it possible to display only zoom in zoomout rotate properties of figure

Sure it is possible. Disable Matlab's original toolbar and define your own:
figure('toolbar', 'none');
toolbarH = uitoolbar;
uitoggletool(toolbarH);
...
Now you have an empty button in your own toolbar. Just fill in the corresponding icons and callbacks - you can get them e.g. from a figure with a Matlab toolbar or by diffing in the source of Matlab's toolboxes. Some of the demos are great examples for using UITOGGLETOOL and UIPUSHTOOL also.

But as far as I know, UITOGGLETOOL and UIPUSHTOOL are not documented yet and could change in the future (I cannot test this for 2010a...).
Perhaps it is easier to accept the appearence of unneeded buttons in Matlab's original toolbar. This has the great benefitm that a user does not have to get oriented, but recognizes everything immediately.

Good luck, Jan
From: Subrahmanya Shettigar on
thank you very much sir,

"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <i0hmns$c1f$1(a)fred.mathworks.com>...
> Dear Subrahmanya,
>
> > i have set the toolbar property of gui to figure.
> > but it displays all the tools available. is it possible to display only zoom in zoomout rotate properties of figure
>
> Sure it is possible. Disable Matlab's original toolbar and define your own:
> figure('toolbar', 'none');
> toolbarH = uitoolbar;
> uitoggletool(toolbarH);
> ...
> Now you have an empty button in your own toolbar. Just fill in the corresponding icons and callbacks - you can get them e.g. from a figure with a Matlab toolbar or by diffing in the source of Matlab's toolboxes. Some of the demos are great examples for using UITOGGLETOOL and UIPUSHTOOL also.
>
> But as far as I know, UITOGGLETOOL and UIPUSHTOOL are not documented yet and could change in the future (I cannot test this for 2010a...).
> Perhaps it is easier to accept the appearence of unneeded buttons in Matlab's original toolbar. This has the great benefitm that a user does not have to get oriented, but recognizes everything immediately.
>
> Good luck, Jan