# Get the child of canvas

**URL:** <https://forum.kirupa.com/t/get-the-child-of-canvas/295212>\
**Category:** Uncategorized\
**Created:** [August 26, 2009, 6:40pm UTC](https://forum.kirupa.com/t/get-the-child-of-canvas/295212 "2009-08-26T18:40:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mac345](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mac345](https://forum.kirupa.com/u/mac345)\
**Post date:** [August 26, 2009, 6:40pm UTC](https://forum.kirupa.com/t/get-the-child-of-canvas/295212/1 "2009-08-26T18:40:24Z")

</div>

Hi,

I have a Canvas(oldcanvas) whose child is a Panel [and is the only child].

Now i want to drag and drop that panel on to someother canvas(newcanvas).

But by using newcanvas.addChild(oldcanvas.getChild(0)) is not working.

I am able to add the complete oldcanvas to the newcanvas but not able to get the child i.e the panel inside that.

Is there any solution for this??

Thanks
