1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    84
    Answers
    7
    Vote Rating
    0
    suamikim is on a distinguished road

      0  

    Default Answered: Collapsed panel in border-layout: Permanent expand on title-click

    Answered: Collapsed panel in border-layout: Permanent expand on title-click


    Hey there,

    i have 2 panels inside a border-layout. The second one is collapsible with configs 'collapsed' and 'titleCollapse' set. When i click on the title it just shows the panel "temporary" which means that it doesn't stick but collapses automatically after i click anywhere else inside my window. It kind of floats in...

    Working example: http://jsfiddle.net/suamikim/LNfm8/
    PHP Code:
    Ext.onReady(function() {
        
    Ext.create('Ext.window.Window', {
            
    width500,
            
    height300,
            
            
    layout'border',
            
            
    items: [{
                    
    xtype'panel',
                    
    title'panel1',
                    
    region'center',
                    
    flex1
                
    },{
                    
    xtype'panel',
                    
    title'panel2',
                    
    region'south',
                    
    flex1,
                    
                    
    collapsibletrue,
                    
    collapsedtrue,
                    
    animCollapsefalse,
                    
    collapseDirectionExt.Component.DIRECTION_BOTTOM,
                    
    titleCollapsetrue
            
    }]
        }).
    show();
    }); 
    I guess this is a feature of the border-layout because if i put the 2 panels into a box-layout the collapsed panel permanently expands after a click on the title-bar.

    I would really appreciate if anyone could tell me how to turn that feature of the border-layout off.

    Thanks

  2. It couldn't be easier: There's the config 'floatable' which only needs to be set to false...

    See the fiddle: http://jsfiddle.net/LNfm8/1/

    I'm a little ashamed for myself for overlooking this config and on the other hand i'm dissapointed at the forum that nobody answered this simple one...

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,074
    Answers
    111
    Vote Rating
    94
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    if you want the panel to remain expanded, then you need to click on the "double-arrow" tool in the panel header.

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    84
    Answers
    7
    Vote Rating
    0
    suamikim is on a distinguished road

      0  

    Default


    I'm aware of this and it also stays expanded if i click on the title a second time after it has been "floated in" but i just don't want this floating-behaviour at all because i experienced it as pretty buggy so far.

    That is why i'm asking if i can turn it completely off like in a box-layout.

    Thanks

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    84
    Answers
    7
    Vote Rating
    0
    suamikim is on a distinguished road

      0  

    Default


    It couldn't be easier: There's the config 'floatable' which only needs to be set to false...

    See the fiddle: http://jsfiddle.net/LNfm8/1/

    I'm a little ashamed for myself for overlooking this config and on the other hand i'm dissapointed at the forum that nobody answered this simple one...

Thread Participants: 1