For Programmers: Free Programming Magazines  


Home > Archive > Matlab > December 2005 > GUIs and sub-GUIs









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author GUIs and sub-GUIs
dario

2005-12-15, 7:07 pm

Hi all,
I have 2 GUIs in my program. Can I draw one GUI 'inside' the other?
The following commands create two object, one 'inside' the other:
h1=figure
h2=uicontrol

I wish to obtain the same result with my GUIs:

h1=myGui1
h2=myGui2

It is possible?

myGui1 and myGui2 are create using GUIDE

Thanks!

helper

2005-12-15, 7:07 pm

dario wrote:
>
>
> Hi all,
> I have 2 GUIs in my program. Can I draw one GUI 'inside' the other?
> The following commands create two object, one 'inside' the other:
> h1=figure
> h2=uicontrol
>
> I wish to obtain the same result with my GUIs:
>
> h1=myGui1
> h2=myGui2
>
> It is possible?
>
> myGui1 and myGui2 are create using GUIDE
>
> Thanks!
>
>


A GUI is only a figure, and one figure can't be a parent to another
figure. However, if you place all the uicontrols from myGui2 into a
uipanel, you can then use COPYOBJ to copy that uipanel from myGui2
into myGui1. You would then need to be sure to make all callbacks
from MyGui2 visible to MyGui1.
dario

2005-12-15, 7:07 pm


helper ha scritto:

> dario wrote:
>
> A GUI is only a figure, and one figure can't be a parent to another
> figure. However, if you place all the uicontrols from myGui2 into a
> uipanel, you can then use COPYOBJ to copy that uipanel from myGui2
> into myGui1. You would then need to be sure to make all callbacks
> from MyGui2 visible to MyGui1.


Thanks for your answer.
Can you explain /give a link in the documentation
about the last point,
>to be sure to make all callbacks
> from MyGui2 visible to MyGui1.


Thanks

helper

2005-12-15, 7:07 pm

dario wrote:
>
>
>
> helper ha scritto:
>
the[color=darkred]
> other?
> another
into[color=darkred]
> a
> myGui2
callbacks[color=darkred]
>
> Thanks for your answer.
> Can you explain /give a link in the documentation
> about the last point,
>
> Thanks
>
>


This might be easier if you explain more about why you are doing
this. Why don't you just open both GUIs simultaneously, rather than
have one placed "inside" the other?
dario

2005-12-18, 7:58 am


helper ha scritto:

>
> This might be easier if you explain more about why you are doing
> this. Why don't you just open both GUIs simultaneously, rather than
> have one placed "inside" the other?



I think GoogleGroup 'ate' my previous answer, so I put it:

I started with only two GUIs, and I open both GUIs simultaneously.
Now inmy program I have 8 GUIs, so when I open all GUIs
simultaneously,the gui itself is 'unfrendly' and create confusion in
the user.

....at the end of the story, I decide to re-write all my code using a
single GUI.


Thanks for your help

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com