From: mu'tasem on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i6D4o.33403$Bh2.12739(a)newsfe04.iad>...
> mu'tasem wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> > <i2t1cj$od5$2(a)canopus.cc.umanitoba.ca>...
> >> mu'tasem wrote:
> >> >
> >> > .... as the same for panel with components
> >> > copyobj(findall(GUI1,'Type','uipanel4'),GUI2);
> >> > .... i'm try the above statement but not working...
> >>
> >> There is no graphic object with type 'uipanel4'. There are graphic
> >> objects of type 'uipanel', and you might happen to have a variable
> >> named uipanel4 that is the handle of a uipanel.
> >>
> >> If you want to copy a particular graphics object to be underneath the
> >> figure GUI2, then
> >>
> >> copyobj(TheExistingObject, GUI2)
> >
> > This means that you must change the type to panel as it is:
> > copyobj(findall(GUI1,'uipanel','uipanel4'),GUI2);
>
> No.
>
> copyobj(findall(GUI1,'Type','uipanel'),GUI2);
>
> 'Type' is a keyword.
>
>
> > because i'm try this statement: copyobj(TheExistingObject, GUI2)
> > but noting ??
> > Note: in the uipanel i have 3 Static Text and two axes inserted the
> > values from GUI1, then i need to transfer all the components (uipanel4)
> > to GUI2.... with regards
>
> copyobj(get(GUI1,'Children'),GUI2)
>
> and forget about copying the panel contents specifically.

Dear Walter Roberson
I tried the above code copyobj(get(GUI1,'Children'),GUI2) , but has been copied the contents of each gui1 and not the contents of the panel needed..
From: mu'tasem on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i6D4o.33403$Bh2.12739(a)newsfe04.iad>...
> mu'tasem wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> > <i2t1cj$od5$2(a)canopus.cc.umanitoba.ca>...
> >> mu'tasem wrote:
> >> >
> >> > .... as the same for panel with components
> >> > copyobj(findall(GUI1,'Type','uipanel4'),GUI2);
> >> > .... i'm try the above statement but not working...
> >>
> >> There is no graphic object with type 'uipanel4'. There are graphic
> >> objects of type 'uipanel', and you might happen to have a variable
> >> named uipanel4 that is the handle of a uipanel.
> >>
> >> If you want to copy a particular graphics object to be underneath the
> >> figure GUI2, then
> >>
> >> copyobj(TheExistingObject, GUI2)
> >
> > This means that you must change the type to panel as it is:
> > copyobj(findall(GUI1,'uipanel','uipanel4'),GUI2);
>
> No.
>
> copyobj(findall(GUI1,'Type','uipanel'),GUI2);
>
> 'Type' is a keyword.
>
>
> > because i'm try this statement: copyobj(TheExistingObject, GUI2)
> > but noting ??
> > Note: in the uipanel i have 3 Static Text and two axes inserted the
> > values from GUI1, then i need to transfer all the components (uipanel4)
> > to GUI2.... with regards
>
> copyobj(get(GUI1,'Children'),GUI2)
>
> and forget about copying the panel contents specifically.

Dear Walter Roberson
I tried the above code copyobj(get(GUI1,'Children'),GUI2) , but has been copied the contents of each gui1 and not the contents of the panel needed..
From: Walter Roberson on
mu'tasem wrote:

> I tried the above code copyobj(get(GUI1,'Children'),GUI2) , but
> has been copied the contents of each gui1 and not the contents
> of the panel needed..

I already gave you solutions.

> Walter Roberson <roberson(a)hushmail.com> wrote in message

>> >> If you want to copy a particular graphics object to be underneath
>> the >> figure GUI2, then
>> >>
>> >> copyobj(TheExistingObject, GUI2)
From: mu'tasem on
Walter Roberson <roberson(a)hushmail.com> wrote in message <b3W5o.57271$KT3.44267(a)newsfe13.iad>...
> mu'tasem wrote:
>
> > I tried the above code copyobj(get(GUI1,'Children'),GUI2) , but
> > has been copied the contents of each gui1 and not the contents
> > of the panel needed..
>
> I already gave you solutions.
>
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
>
> >> >> If you want to copy a particular graphics object to be underneath
> >> the >> figure GUI2, then
> >> >>
> >> >> copyobj(TheExistingObject, GUI2)

Dear sir
i need copy just panel 4 not all gui1...
i tried the following code then appears error as it is:
??? Undefined function or variable 'uipanel4'.
Error in ==> Drawing>pushbutton7_Callback at 383
copyobj(uipanel4, screen)

??? Undefined function or variable 'TheExistingObject'.
Error in ==> Drawing>pushbutton7_Callback at 383
copyobj(TheExistingObject, screen)
From: Walter Roberson on
mu'tasem wrote:

> i need copy just panel 4 not all gui1...

That cannot be done. Once the panels become part of a figure, they become
logically unordered. You might have stored the uipanel handle in the variable
named uipanel4 when you created the panel, but unless you preserved the
contents of that variable, Matlab doesn't know that (or care), and it is now
just another of the uipanels that are children of the figure.

If there are particular properties of the panel you are interested in that are
unique to that panel, then you can match those properties using a findobj()
call in order to locate the handle of the desired panel, and then use
copyobj() to copy it to the other gui.

I suggest that in future you consider using the Tag property of handle
graphics objects in order to give a unique and locatable property to each
object of particular interest.