1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    6
    Vote Rating
    0
    Lord Micro is on a distinguished road

      0  

    Exclamation [CLOSED][PR5] Panel(+regions) and fieldset with anchor 100% - fail

    [CLOSED][PR5] Panel(+regions) and fieldset with anchor 100% - fail


    My code:
    PHP Code:
    Ext.create('Ext.Window', {
        
    width400,
        
    height300,
        
    title'Window',
        
    layout'fit',
        
    modaltrue,
        
    items: [{
            
    xtype'panel',
            
    layout'border',
            
    borderfalse,
            
    items: [{
                
    region'center',
                
    collapsiblefalse,
                
    borderfalse,
                
    bodyPadding5,
                
    items: [{
                    
    xtype'fieldset',
                    
    title'Bad Fieldset',
                    
    layout'anchor',
                    
    items: [{
                        
    xtype'textfield',
                        
    fieldLabel'Field',
                        
    anchor'100%'
                    
    }],
                }, {
                    
    xtype'fieldset',
                    
    title'God Fieldset',
                    
    layout'anchor',
                    
    items: [{
                        
    xtype'textfield',
                        
    fieldLabel'Field',
                        
    anchor'85%'
                    
    }],
                }, {
                    
    xtype'fieldset',
                    
    title'Good Fieldset',
                    
    layout'anchor',
                    
    items: [{
                        
    xtype'textfield',
                        
    fieldLabel'Field',
                    }],
                }],
            }, {
                
    collapsibletrue,
                
    title'East',
                
    region'east',
                
    width'30%',
                
    html'East'
            
    }],
        }],
    }).
    show(); 
    When load - all very good.
    But if you hide and show the east, then east to the region will hide part of the central region.
    Tested at Browser:
    • Google Chrome 10.0.648.151 - FAIL
    • Firefox 3.6.15 - FAIL
    • IE 8.0.7601.17514 - good
    Load:
    load.png
    Then hide east region:
    hide.png
    Then show east region - FAIL
    show.png
    Last edited by Lord Micro; 21 Mar 2011 at 5:58 AM. Reason: close, no problem

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,067
    Vote Rating
    660
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Center has no layout:

    Code:
    Ext.onReady(function(){
        Ext.create('Ext.Window', {
            width: 400,
            height: 300,
            title: 'Window',
            layout: 'fit',
            modal: true,
            items: [{
                xtype: 'panel',
                layout: 'border',
                border: false,
                items: [{
                    flex: 7,
                    region: 'center',
                    collapsible: false,
                    border: false,
                    bodyPadding: 5,
                    layout: 'anchor',
                    items: [{
                        xtype: 'fieldset',
                        title: 'Bad Fieldset',
                        layout: 'anchor',
                        items: [{
                            xtype: 'textfield',
                            fieldLabel: 'Field',
                            anchor: '100%'
                        }],
                    }, {
                        xtype: 'fieldset',
                        title: 'God Fieldset',
                        layout: 'anchor',
                        items: [{
                            xtype: 'textfield',
                            fieldLabel: 'Field',
                            anchor: '85%'
                        }],
                    }, {
                        xtype: 'fieldset',
                        title: 'Good Fieldset',
                        layout: 'anchor',
                        items: [{
                            xtype: 'textfield',
                            fieldLabel: 'Field',
                        }],
                    }],
                }, {
                    collapsible: true,
                    title: 'East',
                    region: 'east',
                    flex: 3,
                    html: 'East'
                }],
            }],
        }).show();
    });
    Also note % widths aren't supported.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    6
    Vote Rating
    0
    Lord Micro is on a distinguished road

      0  

    Exclamation


    Your code does not work in FireFox 4, but works fine in Google Chrome. How do I fix this?

Similar Threads

  1. Replies: 4
    Last Post: 9 Aug 2009, 2:51 PM
  2. Replies: 9
    Last Post: 20 Jul 2009, 4:43 AM
  3. Replies: 1
    Last Post: 30 Jun 2009, 2:27 PM
  4. Replies: 7
    Last Post: 4 Jun 2008, 3:44 AM

Thread Participants: 1