I have a gui created using guide. I would like this gui to
launch in the upper left corner of the screen.
I tried using 'movegui', but I can only get it to work after
the gui has become viewable <ie it does not work within the
GUI_OpeningFunction(...) area>, causing it to jump to the
new location.
"Thorarin Bjarnason" <thor4ooo@gmail.com> wrote in message
<g4lj6e$b6a$1@fred.mathworks.com>...
> Hello:
>
> I have a gui created using guide. I would like this gui to
> launch in the upper left corner of the screen.
>
> I tried using 'movegui', but I can only get it to work after
> the gui has become viewable <ie it does not work within the
> GUI_OpeningFunction(...) area>, causing it to jump to the
> new location.
>
> Suggestions?
It's a UI Panel property called "Position". It looks like this:
"rect = [left, bottom, width, height]
where left and bottom define the distance from the lower
left corner of the screen to the lower left corner of the
figure window. width and height define the dimensions of the
window. See the Units property for information on the units
used in this specification. The left and bottom elements can
be negative on systems that have more than one monitor." <--
I copied and pasted this for you.
You can get real fancy by normalizing all your figures
depending on the size of the monitor user has :). Search
help files for the "The Position Vector"
"Thorarin Bjarnason" <thor4ooo@gmail.com> wrote in message
<g4lj6e$b6a$1@fred.mathworks.com>...
> Hello:
>
> I have a gui created using guide. I would like this gui
to
> launch in the upper left corner of the screen.
>
> I tried using 'movegui', but I can only get it to work
after
> the gui has become viewable <ie it does not work within
the
> GUI_OpeningFunction(...) area>, causing it to jump to the
> new location.
>
> Suggestions?
Lauch your main gui (say main_gui)through other m
function say calling_fcn and do the following
example:
function calling_fcn
h = main_gui;
movegui(h,'northwest');
"Vihang Patil" <vihang_patil@yahoo.com> wrote in message
<g4nbec$oi7$1@fred.mathworks.com>...
> "Thorarin Bjarnason" <thor4ooo@gmail.com> wrote in message
> <g4lj6e$b6a$1@fred.mathworks.com>...
> > Hello:
> >
> > I have a gui created using guide. I would like this gui
> to
> > launch in the upper left corner of the screen.
> >
> > I tried using 'movegui', but I can only get it to work
> after
> > the gui has become viewable <ie it does not work within
> the
> > GUI_OpeningFunction(...) area>, causing it to jump to the
> > new location.
> >
> > Suggestions?
> Lauch your main gui (say main_gui)through other m
> function say calling_fcn and do the following
> example:
>
> function calling_fcn
> h = main_gui;
> movegui(h,'northwest');
>
>
> HTH
> Vihang
>
>
>
If GUIDE finds your gui is too close to the edge, it will
reposition it UNLESS you have defined a layout function. The
layout function just needs to open the fig file, then you
can reposition the figure anywhere you want. (Either in the
openingfcn, the layoutfcn, or saved in the figure itself.)
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.