Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9161093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:53:27+00:00 2026-06-17T13:53:27+00:00

I am a beginner of extjs. I want to arrange some TextFields as below:

  • 0

I am a beginner of extjs.

I want to arrange some TextFields as below:

    a:______    b:______    c:______

    d:______    e:______    f:______

here are my test codes below:

Ext.onReady(function()
{
    new Ext.panel.Panel(
    {
        renderTo: Ext.getBody(),
        layout:'vbox',
        width: 670,
        tbar: [{text:"Add"}],
        defaults:
        {
            layout:"column",
            height:50
        },
        items:
        [
            {
                defaults:
                {
                    labelAlign:"right",
                    labelWidth:50
                },
                items:
                [
                    {
                        xtype: 'textfield',
                        fieldLabel: 'a'
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'b'
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'c'
                    }
                ]
            },
            {
                defaults:
                {
                    labelAlign:"right",
                    labelWidth:50
                },
                items:
                [
                    {
                        xtype: 'textfield',
                        fieldLabel: 'd'
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'e'
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'f'
                    }
                ]
            }
        ]
    });
});

as a result, the page can’t display any TextFields.

Thank you for any help in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:53:28+00:00Added an answer on June 17, 2026 at 1:53 pm

    You can do something like :

    new Ext.panel.Panel({
      renderTo: Ext.getBody(),
      width: 670,
      tbar: [{
        text: "Add"
      }],
      defaults: {
        layout: ,
        height: 50
      },
      items: [{
        defaults: {
          labelAlign: "right",
          labelWidth: 50
        },
        items: [{
          xtype: 'textfield',
          fieldLabel: 'a'
        }, {
          xtype: 'textfield',
          fieldLabel: 'b'
        }, {
          xtype: 'textfield',
          fieldLabel: 'c'
        }]
      }, {
        defaults: {
          labelAlign: "right",
          labelWidth: 50
        },
        items: [{
          xtype: 'textfield',
          fieldLabel: 'd'
        }, {
          xtype: 'textfield',
          fieldLabel: 'e'
        }, {
          xtype: 'textfield',
          fieldLabel: 'f'
        }]
      }]
    });
    

    It is essentially your same example except replacing the vbox layout with the default auto layout. The reason why you example didn’t work is that vbox layouts need a height and width set on it somehow.

    You could also do something like :

    new Ext.panel.Panel({
      renderTo: Ext.getBody(),
      layout: 'column',
      width: 670,
      tbar: [{
        text: "Add"
      }],
      defaults: {
        labelAlign: "right",
        labelWidth: 50
      },
      items: [{
        xtype: 'textfield',
        fieldLabel: 'a'
      }, {
        xtype: 'textfield',
        fieldLabel: 'b'
      }, {
        xtype: 'textfield',
        fieldLabel: 'c'
      }, {
        xtype: 'textfield',
        fieldLabel: 'd'
      }, {
        xtype: 'textfield',
        fieldLabel: 'e'
      }, {
        xtype: 'textfield',
        fieldLabel: 'f'
      }]
    });
    

    It is a column layout without the nested items as the one before. One nice thing about a column layout is that it will shift as many items as it can to the left and if an item can’t fit it will go in the next row.
    Since the width is a static 670 it can only fit 3 text fields per row. Column layouts do not need a height set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python beginner here, I have a list of lists and want to refer to
I am an ExtJS beginner, below is the very simple code fragment taken from
Beginner question . . . I want to run a boolean test on a
Beginner question here! look at picture, I want the butten-edittext-button to fill the width
Beginner question here. I'm going to make a Jquery function that is used to
Beginner question here: I'm trying to understand the some basic memory management. if I'm
Yii beginner here. I am facing some problem with how to query the database
Beginner with python here. I've been doing some online tutorials and can't seem to
Beginner question: I want to debug some code that compiles. I pressed debug, it
beginner to python here. I have 2 nested lists that I want to merge:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.