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

  • SEARCH
  • Home
  • 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 9242875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:40:47+00:00 2026-06-18T08:40:47+00:00

Ext.create(‘Ext.panel.Panel’, { renderTo: Ext.getBody(), width: 400, height: 300, title: ‘Container Panel’, items: [ {

  • 0
Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
width: 400,
height: 300,
title: 'Container Panel',
items: [
    {
        xtype: 'panel',
        title: 'Child Panel 1',
        height: 100,
        width: '75%'
    },
    {
        xtype: 'panel',
        title: 'Child Panel 2',
        height: 100,
        width: '75%'
    }
]
});

The above code is not being executed… Can you please find the error or bug. I am very new to extjs. I found the above code while going through the documentaion(check ‘containers’ Section). It is executing fine in jsfiddle but not in my project.(other samples are working fine in my project).

ANSWER:

Ext.onReady(function(){
    Ext.create('Ext.panel.Panel', {
        renderTo: Ext.getBody(),
        width: 400,
        height: 300,
        layout: 'hbox',
        title: 'Container Panel',
        items: [
           {
               xtype: 'panel',
               title: 'Child Panel 1',
               height: 100,                
               flex:1
           },
           {
               xtype: 'panel',
               title: 'Child Panel 2',
               height: 100,
               flex:1
           }
       ]
   });
});
  • 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-18T08:40:49+00:00Added an answer on June 18, 2026 at 8:40 am

    Several problems:

    1) You need to wrap the code in an onReady block.

    2) The widths are not valid. How can both of them be 75%? In this case, you will want to use an hbox layout, with each child item being flex: 1.

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

Sidebar

Related Questions

2 panels: Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', items: [ { xtype: 'panel', html:
This is my ext code Ext.create('Ext.panel.Panel', { title: 'Customer Information', width: 300, bodyPadding: 5,
Ext.create('Ext.form.FormPanel', { title: 'Task option', items:[ { xtype: 'textfield', name: 'txt-test1', id: 'time', How
Given the following javascript: var fo = Ext.create('Ext.form.Panel', { layout:'box', ... items: [{ xtype:
If I have something like this: var container = Ext.create('Ext.container.Container', { plain:true, width :
I have the following construct to create a select: Ext.create('Ext.field.Select', { renderTo: Ext.get(displaySizes), xtype:
I am using ExtJS Forms. My form code is as follows: Ext.create('Ext.form.Panel', { width:
I have Ext.button.Split, for example: Ext.create('Ext.button.Split', { renderTo: Ext.getBody(), text: 'Example', handler: function() {
I'm student study Extjs4! I make Ext.form.Panel var panel = Ext.create('Ext.form.Panel', { title :
The property width is a pixel width. { xtype: 'grid', store: store, selModel: Ext.create('Ext.selection.CheckboxModel',

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.