开发者

ExtJS: How to force tabbed FormPanel fill all available space?

开发者 https://www.devze.com 2023-04-05 14:54 出处:网络
I want to make a tabbed formPanel fitting user\'s screen. here\'s my code: var form2 = new Ext.FormPanel({

I want to make a tabbed formPanel fitting user's screen.

here's my code:

var form2 = new Ext.FormPanel({
   labelWidth: 75,
   border:false,    
   items: {
      // removing next line affects the layout %)
      xtype:'tabpanel',
      activeTab: 0,
      defaults:{autoHeight:true, bodyStyle:'padding:10px'},
      items:[
      {
         title:'Personal Details',
         layout:'form',
         defaults: {width: 230},
         defaultType: 'textfield',
         items: [
           {
              fieldLabel: 'First Name'
           }
         ]
      },
      {
         title:'Phone Numbers',
         layout:'form',
         defaults: {width: 230},
         defaultType: 'textfield',
         items: [
           {
              fieldLabel: 'Home'
           }
         ]
      }
      ]
    }
 });

 form2.render('container');

And later in my a have an , of course.

That makes a form with incredibly big width...

If I revome line with "xtype: 'tabpanel'" everything works fine (except there's no tabbed panel on screen)

Is it a bug or I forgot something. Help me figure it out, please=)

Thanks for your a开发者_Go百科ttention.


Set anchor and set layout : fit configs for formpanel.

0

精彩评论

暂无评论...
验证码 换一张
取 消