Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    34
    Vote Rating
    0
    Kirua007 is on a distinguished road

      0  

    Question Dynamic remove of a component in a ContentPanel

    Dynamic remove of a component in a ContentPanel


    Hi,

    I would like to knwo how can I remove a component from a panel:

    I try this :

    Code:
    ContentPanel cp = (ContentPanel) this.getWidget();
    cp.removeAll();
    cp.layout();
    But component in the screen still be visible ....

    With an dynamic add there is no problem , no problem with a dynamic sizing of the panel too

    Thank you for your answer

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You want to remove the ContentPanel or all children ofthis ContentPanel? With your code you remove all children of that contentpanel.

  3. #3
    Ext User
    Join Date
    Apr 2010
    Posts
    34
    Vote Rating
    0
    Kirua007 is on a distinguished road

      0  

    Default


    All children of the panel in order to have a "blank" panel ...

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Than that code is correct. If it is not working, please post a fully working testcase that implements EntryPOnit

  5. #5
    Ext User
    Join Date
    Apr 2010
    Posts
    34
    Vote Rating
    0
    Kirua007 is on a distinguished road

      0  

    Default


    I found the origin of the problem

    My panel doesn't contain classic component but my own component which extend composite (of GWT librairie)
    My component :
    Code:
    public class ComplexField extends Composite {
        
        ElementType myElement;
        int size;
        String label;
        HorizontalPanel horizontalPanel;
        
        public ComplexField(ElementType element,int size,String htmlLabel)
        {
            this.myElement=element;
            this.size=size;
            this.label = htmlLabel;
            horizontalPanel = new HorizontalPanel();
            horizontalPanel.setSpacing(10);
                    
        }
    
        public ElementType getMyElement() {
            return myElement;
        }
        
        public void removeAll()
        {
            HorizontalPanel  horizontalPanel = (HorizontalPanel)this.getWidget();
            horizontalPanel.removeAll();
            horizontalPanel.layout();
        }
    }
    With my own component, the removeAll of the panel doesn't work. Component stay on the screen
    So I add the removeAll function on my component and I call it before calling removeAll of the Panel

    Code:
    ContentPanel panel = (ContentPanel)this;
            for(int i=0;i<panel.getItemCount();i++)
            {
                ComplexField cf = (ComplexField)panel.getWidget(i);
                cf.removeAll();
            }
            
            panel.removeAll();
    panel.layout();

    Like this, it's works but I am not sure of the solution ...

    Is It normal ?

    Thank you

Similar Threads

  1. How to remove the background-image of contentpanel
    By rameshr in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 13 Nov 2009, 5:07 AM
  2. [2.0b1][CLOSED] FieldSet component remove doesn't remove label
    By iaresean in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 15 Oct 2007, 2:25 AM
  3. Howto properly remove contentpanel overflow.
    By wajatimur in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 28 May 2007, 6:17 AM
  4. add and remove ContentPanel tabs
    By brunnolou in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 7 May 2007, 10:35 AM
  5. Trigger to remove ContentPanel
    By flinden68 in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 19 Dec 2006, 9:51 AM

Thread Participants: 1