addChild/addMember question

hi, i am triying to use Canvas.addChild() and Layout.addMember, but i can make it work, i use it so:

c.addChild(b); // here c is a Canvas and b is the id of a component canvas derived (for example a button)

too i tried this:

c.addChild(b); // here c is a Canvas and b is a variable containing a reference to a component canvas derived (for example a button).

i tried to use addMember in similar way and it does not function too.

i was looking in the docs, in the forum and the samples but i can’t see any thing that show me how most be do it.
¿ am i missing something ? ¿ need call another function to refresh the container canvas ?
Thanks

Hi Alex,

The good news is that these APIs are used by all of SmartClient’s components (eg ListGrid, SectionStack..) so they are definitely working :slight_smile:

Most likely, the APIs are succeeding but it is not obvious that this is the case from what you see on the screen. Check the Watch Tab in the Developer Console to verify that the parent-child relationship has been established. Then, try adding background color or border to the parent and child so you can see their exact extents.

Please let us know if this resolves your problem.

thanks for your reply, the error was produced because i was writing the id attribute in lowercase.
thanks.