View Full Version : how to use a same component between outer panels and inner panels?
17 Aug 2011, 11:17 AM
consider i have a piechart and a button on clicking the button , i need the same piechart in a panel inside the originial it,inside panel should be created dynamically
if anyone understood can help me ??
18 Aug 2011, 2:45 PM
I'm not entirely sure I follow but I'll try...
You can't have the same components in two different places at the same time, you'd need 2 components for that.
If you want to move a component that should be achievable. Use the remove() and add() or insert() methods on the relevant containers. There are 2 majors gotchas. Firstly, components are destroyed by default when you remove them, so make sure you pass false as the second argument to remove(). Secondly, not all layouts allow you to add or remove components, mostly notably border layout. If you find yourself using such a layout, the standard workaround is to add an extra level of containers.
Does that answer your question?
19 Aug 2011, 6:37 AM
Thanks for your reply , but shall be able to prevent the removal by setting up some handlers ?
19 Aug 2011, 10:08 AM
I'm afraid I don't understand the question. What removal are you talking about? The only removal I mentioned is part of the process to move the component. If you prevent it being removed it won't move.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.