1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    12
    Vote Rating
    0
    btoc007 is on a distinguished road

      0  

    Default Answered: Ext.form.Panel is not visible

    Answered: Ext.form.Panel is not visible


    The following code shows the foo and bar panel but the Ext.form.Panel sandwiched between the two is not visible. Any ideas?

    Code:
    Ext.application({
        name: 'Sencha',
    
    
        launch: function() {
            Ext.create("Ext.Panel", {
                fullscreen: true,
                layout: 'vbox',
                items: [
                    Ext.create('Ext.Panel', {
                    	html: 'foo'
                    }),
                    Ext.create('Ext.form.Panel', {
            			items: [{
                	        name : 'username',
                	        label: 'Username',
                	        xtype: 'textfield'
                	    }, {
                	        name : 'password',
                	        label: 'Password',
                	        xtype: 'passwordfield'
                	    }]
                	}),
                	Ext.create('Ext.Panel', {
                    	html: 'bar'
                    }),
                ]
            });
        }
    });

  2. That is probably because the form panel is scrollable, and scrollable items can't have auto-height. Try setting scrollable: false on your form panel. You could also just give your form panel a flex of 1.

  3. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    12
    Vote Rating
    0
    btoc007 is on a distinguished road

      0  

    Default Flex is required?

    Flex is required?


    If I set flex to 1 for all items then it is rendered. In S1 though it use to render and the height of each item was the height of the content. What is confusing is it does it for Panel but not form.Panel.

  4. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Answers
    28
    Vote Rating
    9
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    That is probably because the form panel is scrollable, and scrollable items can't have auto-height. Try setting scrollable: false on your form panel. You could also just give your form panel a flex of 1.

  5. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    12
    Vote Rating
    0
    btoc007 is on a distinguished road

      0  

    Default Yes

    Yes


    That seems to fix it

Thread Participants: 1