Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Axes properties: Toolbar in a GUI

Subject: Axes properties: Toolbar in a GUI

From: Elijah

Date: 13 May, 2008 14:05:05

Message: 1 of 4

Yo
I want to add toolbars to my gui, so when the user plots
stuff, he can zoom in to make sure everything works out
great. doc axes_props has nothing about toolbars, and I'm
sorta at a loss. Is this a pipe dream or can it be done?

Check out this picture for an in-depth depiction of what I'm
looking for...
http://i43.photobucket.com/albums/e372/elijahauger/kthx.jpg

-eli

Subject: Re: Axes properties: Toolbar in a GUI

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 13 May, 2008 16:10:54

Message: 2 of 4

In article <g0c76h$nom$1@fred.mathworks.com>,
Elijah <eli.auger@harley-davidson.com> wrote:

>I want to add toolbars to my gui, so when the user plots
>stuff, he can zoom in to make sure everything works out
>great. doc axes_props has nothing about toolbars, and I'm
>sorta at a loss. Is this a pipe dream or can it be done?

In Matlab, toolbars can -only- go at the top, never within an axes.

You can create a toolbar using uitoolbar()

  ht = uitoolbar('PropertyName1',value1,'PropertyName2',value2,...)
  creates an empty toolbar at the top of the current figure window, and
  returns a handle to it.

And if you look at the Uitoolbar Properties help you can see that
the Parent can only be a figure, and there is no Position property.
--
   "No one has the right to destroy another person's belief by
   demanding empirical evidence." -- Ann Landers

Subject: Re: Axes properties: Toolbar in a GUI

From: Steven Lord

Date: 13 May, 2008 16:45:24

Message: 3 of 4


"Walter Roberson" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message
news:g0ceie$h12$1@canopus.cc.umanitoba.ca...
> In article <g0c76h$nom$1@fred.mathworks.com>,
> Elijah <eli.auger@harley-davidson.com> wrote:
>
>>I want to add toolbars to my gui, so when the user plots
>>stuff, he can zoom in to make sure everything works out
>>great. doc axes_props has nothing about toolbars, and I'm
>>sorta at a loss. Is this a pipe dream or can it be done?
>
> In Matlab, toolbars can -only- go at the top, never within an axes.
>
> You can create a toolbar using uitoolbar()
>
> ht = uitoolbar('PropertyName1',value1,'PropertyName2',value2,...)
> creates an empty toolbar at the top of the current figure window, and
> returns a handle to it.
>
> And if you look at the Uitoolbar Properties help you can see that
> the Parent can only be a figure, and there is no Position property.

If the OP wants the default figure toolbar in their GUI, changing the
figure's Toolbar property to 'figure' is probably sufficient.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#Toolbar

--
Steve Lord
slord@mathworks.com


Subject: Re: Axes properties: Toolbar in a GUI

From: Elijah

Date: 14 May, 2008 17:54:02

Message: 4 of 4

Thanks for the responses, guys. I figured out what I wanted...

in the OpeningFcn, I added this line before updating guidata:

set(hObject,'toolbar','figure');


It's rad.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
axes properties gui Elijah 13 May, 2008 10:10:22
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics