Thread Subject: How to load a GUI from another GUI window

Subject: How to load a GUI from another GUI window

From: Jean Lim

Date: 26 May, 2008 09:16:02

Message: 1 of 9

Hi,

I doing a GUI calculator, therefore need to do one GUI with
several pushbuttons that launch another GUI in the same
window, without opening a new figure window.

Can someone advise me how to do it?

Thanks a lot.

Jean

Subject: How to load a GUI from another GUI window

From: Omur Bas

Date: 27 May, 2008 07:35:02

Message: 2 of 9

"Jean Lim" <inno_pf@yahoo.com.sg> wrote in message
<g1dv4i$l6a$1@fred.mathworks.com>...
> Hi,
>
> I doing a GUI calculator, therefore need to do one GUI with
> several pushbuttons that launch another GUI in the same
> window, without opening a new figure window.
>
> Can someone advise me how to do it?
>
> Thanks a lot.
>
> Jean
>

Do you mean docking a new GUI in the same window? AFAIK,
this is not possible. However, I've managed to get the same
effect by implementing the separate "GUI"s as panels in the
same GUI, and making them visible/invisible as required,
resized to the same position.

Not an elegant solution, and is sometimes a pain to work
with, but it works. On the other hand, it eliminates the
issue of data transfer between the two (in my case, several)
GUI's.

If you decide to go this way, you'll want to set the Units
property of the panels and panel objects to "Normalized" so
that when the panel is resized, all objects on it follow suit.

Hope this helps,
Omur Bas
www.promodsoftware.com.tr

Subject: How to load a GUI from another GUI window

From: Jean Lim

Date: 27 May, 2008 11:28:01

Message: 3 of 9

"Omur Bas" <omur.bas@promodxxxxxx.com.tr> wrote in message
<g1gdj6$kpk$1@fred.mathworks.com>...
> "Jean Lim" <inno_pf@yahoo.com.sg> wrote in message
> <g1dv4i$l6a$1@fred.mathworks.com>...
> > Hi,
> >
> > I doing a GUI calculator, therefore need to do one GUI
with
> > several pushbuttons that launch another GUI in the same
> > window, without opening a new figure window.
> >
> > Can someone advise me how to do it?
> >
> > Thanks a lot.
> >
> > Jean
> >
>
> Do you mean docking a new GUI in the same window? AFAIK,
> this is not possible. However, I've managed to get the
same
> effect by implementing the separate "GUI"s as panels in
the
> same GUI, and making them visible/invisible as required,
> resized to the same position.
>
> Not an elegant solution, and is sometimes a pain to work
> with, but it works. On the other hand, it eliminates the
> issue of data transfer between the two (in my case,
several)
> GUI's.
>
> If you decide to go this way, you'll want to set the Units
> property of the panels and panel objects to "Normalized"
so
> that when the panel is resized, all objects on it follow
suit.
>
> Hope this helps,
> Omur Bas
> www.promodsoftware.com.tr



"I've managed to get the same effect by implementing the
separate "GUI"s as panels in the same GUI, and making them
visible/invisible as required, resized to the same
position. "

How do you do that?

Jean

Subject: How to load a GUI from another GUI window

From: Omur Bas

Date: 27 May, 2008 11:59:01

Message: 4 of 9


>
> "I've managed to get the same effect by implementing the
> separate "GUI"s as panels in the same GUI, and making them
> visible/invisible as required, resized to the same
> position. "
>
> How do you do that?
>
> Jean

Make a panel in your GUI window. Tag it as "panel2". Design
your window on this panel. (If you have already designed a
window, too bad, you can copy the objects but tagging and
callbacks will be lost when you do so.) Don't forget to make
all units normalized, or you'll see problems when you
resize. Then, as a callback in your "main" GUI (i.e. for the
action that will make panel2 visible in your GUI), use:
set(handles.panel2,'visible','on','position',[0 0.5 1 0.5])

This will make panel2 appear on the top half of your GUI
window. For best results, you must make everything else in
the top half invisible. If, for example, another button will
replace panel2 with panel3, you'll use:
set(handles.panel2,'visible','off')
set(handles.panel3,'visible','on','position',[0 0.5 1 0.5])

This way, you can design several panels in GUIDE, minimize
them to "get them out of the way" and use the same space for
different functionalities in the application.

BTW, does a calculator application really require a window
docked in another?

Best,
Omur
www.promodsoftware.com.tr

Subject: How to load a GUI from another GUI window

From: Jean Lim

Date: 27 May, 2008 13:07:02

Message: 5 of 9

"Omur Bas" <omur.bas@promodxxxxxx.com.tr> wrote in message
<g1gt25$dbk$1@fred.mathworks.com>...
>
> >
> > "I've managed to get the same effect by implementing
the
> > separate "GUI"s as panels in the same GUI, and making
them
> > visible/invisible as required, resized to the same
> > position. "
> >
> > How do you do that?
> >
> > Jean
>
> Make a panel in your GUI window. Tag it as "panel2".
Design
> your window on this panel. (If you have already designed a
> window, too bad, you can copy the objects but tagging and
> callbacks will be lost when you do so.) Don't forget to
make
> all units normalized, or you'll see problems when you
> resize. Then, as a callback in your "main" GUI (i.e. for
the
> action that will make panel2 visible in your GUI), use:
> set(handles.panel2,'visible','on','position',[0 0.5 1
0.5])
>
> This will make panel2 appear on the top half of your GUI
> window. For best results, you must make everything else in
> the top half invisible. If, for example, another button
will
> replace panel2 with panel3, you'll use:
> set(handles.panel2,'visible','off')
> set(handles.panel3,'visible','on','position',[0 0.5 1
0.5])
>
> This way, you can design several panels in GUIDE, minimize
> them to "get them out of the way" and use the same space
for
> different functionalities in the application.
>
> BTW, does a calculator application really require a window
> docked in another?
>
> Best,
> Omur
> www.promodsoftware.com.tr

i'm doing a calculator for microstrip filters, have a
number of filter designs, that's why need a few GUIs.

I'll try out your method.

Subject: How to load a GUI from another GUI window

From: Jean Lim

Date: 27 May, 2008 13:40:03

Message: 6 of 9

"Jean Lim" <inno_pf@yahoo.com.sg> wrote in message
<g1h11m$mm7$1@fred.mathworks.com>...
> "Omur Bas" <omur.bas@promodxxxxxx.com.tr> wrote in
message
> <g1gt25$dbk$1@fred.mathworks.com>...
> >
> > >
> > > "I've managed to get the same effect by implementing
> the
> > > separate "GUI"s as panels in the same GUI, and making
> them
> > > visible/invisible as required, resized to the same
> > > position. "
> > >
> > > How do you do that?
> > >
> > > Jean
> >
> > Make a panel in your GUI window. Tag it as "panel2".
> Design
> > your window on this panel. (If you have already
designed a
> > window, too bad, you can copy the objects but tagging
and
> > callbacks will be lost when you do so.) Don't forget to
> make
> > all units normalized, or you'll see problems when you
> > resize. Then, as a callback in your "main" GUI (i.e.
for
> the
> > action that will make panel2 visible in your GUI), use:
> > set(handles.panel2,'visible','on','position',[0 0.5 1
> 0.5])
> >
> > This will make panel2 appear on the top half of your GUI
> > window. For best results, you must make everything else
in
> > the top half invisible. If, for example, another button
> will
> > replace panel2 with panel3, you'll use:
> > set(handles.panel2,'visible','off')
> > set(handles.panel3,'visible','on','position',[0 0.5 1
> 0.5])
> >
> > This way, you can design several panels in GUIDE,
minimize
> > them to "get them out of the way" and use the same
space
> for
> > different functionalities in the application.
> >
> > BTW, does a calculator application really require a
window
> > docked in another?
> >
> > Best,
> > Omur
> > www.promodsoftware.com.tr
>
> i'm doing a calculator for microstrip filters, have a
> number of filter designs, that's why need a few GUIs.
>
> I'll try out your method.
>

By the way, do u know how to link up 2 different GUI window?

Subject: How to load a GUI from another GUI window

From: Jean Lim

Date: 27 May, 2008 13:55:03

Message: 7 of 9

"Omur Bas" <omur.bas@promodxxxxxx.com.tr> wrote in message
<g1gt25$dbk$1@fred.mathworks.com>...
>
> >
> > "I've managed to get the same effect by implementing
the
> > separate "GUI"s as panels in the same GUI, and making
them
> > visible/invisible as required, resized to the same
> > position. "
> >
> > How do you do that?
> >
> > Jean
>
> Make a panel in your GUI window. Tag it as "panel2".
Design
> your window on this panel. (If you have already designed a
> window, too bad, you can copy the objects but tagging and
> callbacks will be lost when you do so.) Don't forget to
make
> all units normalized, or you'll see problems when you
> resize. Then, as a callback in your "main" GUI (i.e. for
the
> action that will make panel2 visible in your GUI), use:
> set(handles.panel2,'visible','on','position',[0 0.5 1
0.5])
>
> This will make panel2 appear on the top half of your GUI
> window. For best results, you must make everything else in
> the top half invisible. If, for example, another button
will
> replace panel2 with panel3, you'll use:
> set(handles.panel2,'visible','off')
> set(handles.panel3,'visible','on','position',[0 0.5 1
0.5])
>
> This way, you can design several panels in GUIDE, minimize
> them to "get them out of the way" and use the same space
for
> different functionalities in the application.
>
> BTW, does a calculator application really require a window
> docked in another?
>
> Best,
> Omur
> www.promodsoftware.com.tr

the matlab version i'm using is ver6.5, don't have the
uipanel function

Subject: How to load a GUI from another GUI window

From: Omur Bas

Date: 27 May, 2008 14:11:02

Message: 8 of 9

"Jean Lim" <inno_pf@yahoo.com.sg> wrote in message
<g1h2vj$eim$1@fred.mathworks.com>...
> "Jean Lim" <inno_pf@yahoo.com.sg> wrote in message
> <g1h11m$mm7$1@fred.mathworks.com>...
> > "Omur Bas" <omur.bas@promodxxxxxx.com.tr> wrote in
> message
> > <g1gt25$dbk$1@fred.mathworks.com>...
> > >
> > > >
> > > > "I've managed to get the same effect by implementing
> > the
> > > > separate "GUI"s as panels in the same GUI, and making
> > them
> > > > visible/invisible as required, resized to the same
> > > > position. "
> > > >
> > > > How do you do that?
> > > >
> > > > Jean
> > >
> > > Make a panel in your GUI window. Tag it as "panel2".
> > Design
> > > your window on this panel. (If you have already
> designed a
> > > window, too bad, you can copy the objects but tagging
> and
> > > callbacks will be lost when you do so.) Don't forget to
> > make
> > > all units normalized, or you'll see problems when you
> > > resize. Then, as a callback in your "main" GUI (i.e.
> for
> > the
> > > action that will make panel2 visible in your GUI), use:
> > > set(handles.panel2,'visible','on','position',[0 0.5 1
> > 0.5])
> > >
> > > This will make panel2 appear on the top half of your GUI
> > > window. For best results, you must make everything else
> in
> > > the top half invisible. If, for example, another button
> > will
> > > replace panel2 with panel3, you'll use:
> > > set(handles.panel2,'visible','off')
> > > set(handles.panel3,'visible','on','position',[0 0.5 1
> > 0.5])
> > >
> > > This way, you can design several panels in GUIDE,
> minimize
> > > them to "get them out of the way" and use the same
> space
> > for
> > > different functionalities in the application.
> > >
> > > BTW, does a calculator application really require a
> window
> > > docked in another?
> > >
> > > Best,
> > > Omur
> > > www.promodsoftware.com.tr
> >
> > i'm doing a calculator for microstrip filters, have a
> > number of filter designs, that's why need a few GUIs.
> >
> > I'll try out your method.
> >
>
> By the way, do u know how to link up 2 different GUI window?

There is an example of this in the documentation, but I
haven't tried myself.

Omur

Subject: How to load a GUI from another GUI window

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

Date: 27 May, 2008 18:09:33

Message: 9 of 9

In article <g1h3rm$on9$1@fred.mathworks.com>,
Jean Lim <inno_pf@yahoo.com.sg> wrote:

>the matlab version i'm using is ver6.5, don't have the
>uipanel function

I have not checked the 6.5 documentation, but before uipanel
were created, the similar functionality was
uicontrol('Style','frame')

--
'Roberson' is my family name; my given name is 'Walter'.

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
gui Jean Lim 26 May, 2008 05:20:04
figure Jean Lim 26 May, 2008 05:20:04
push Jean Lim 26 May, 2008 05:20:04
button Jean Lim 26 May, 2008 05:20:04
rssFeed for this Thread

Contact us at files@mathworks.com