Results 1 to 2 of 2

Thread: Formpanel with hbox layout --> button is not rendered?

  1. #1

    Default Formpanel with hbox layout --> button is not rendered?

    Hi

    I have the followind problem: I created a form-panel object with a hbox layout:

    Code:
     var vTestPanel = new Ext.form.FormPanel({
      title: 'TestPanel',
      id: 'TestPanel',
      //tools: tools,
      draggable:true,
      closeable: false,
      bodyStyle:'padding:5px 5px 0',
      frame:true,
      autoWidth : true, 
      layout: 'hbox',
      width: 700,
      height: 116,
      padding: 10,
      buttonAlign: 'center',
      items : [
        {
         xtype: 'container',
         autoEl: 'div',
         flex: 7,
         layout: 'form',
         margins: '0 10 0 0',
         items: [
          {
           xtype: 'textfield',
           fieldLabel: 'Label',
           anchor: '100%'
          }
         ],
         buttons : [{
            text: 'Test',
            tooltip: 'Testing',
            handler: function() {
              Ext.MessageBox.alert('Superduper', 'Super.....');     
            } //end handler
         }]  
        },
        {
         xtype: 'container',
         autoEl: 'div',
         flex: 3,
         layout: 'form',
         items: [
          {
           xtype: 'textfield',
           fieldLabel: 'Label',
           anchor: '100%'
          }
         ]
        }
       ],
       fbar : {
        xtype: 'toolbar',
        items: [
         {
          xtype: 'button',
          text: 'MyButton'
         }
        ]
       }
     });
    I want that the button with the text 'Test' is displayed just below the left textfield, in the center of the text field looking like this:

    ExampleButton1.jpg

    But, only the button defined in the toolbar at the end of the code is drawn, centered below the two text fields... A DOM inspection showed that my first button is also not there as elemen? Does anybody can give me an advice how to place the first button just below and centered the left text field? Thank you very much! Regards
    Philipp

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    The Container class does not have a "buttons" config.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •