1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Mars
    Posts
    12
    Vote Rating
    0
    anand5589 is on a distinguished road

      0  

    Exclamation Unanswered: how to use a same component between outer panels and inner panels?

    Unanswered: how to use a same component between outer panels and inner panels?


    hi,
    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 ??

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,616
    Vote Rating
    327
    Answers
    545
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    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?

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Mars
    Posts
    12
    Vote Rating
    0
    anand5589 is on a distinguished road

      0  

    Post


    Thanks for your reply , but shall be able to prevent the removal by setting up some handlers ?

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,616
    Vote Rating
    327
    Answers
    545
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    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.

Thread Participants: 1

Tags for this Thread