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 8770383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:33:04+00:00 2026-06-13T17:33:04+00:00

Initially this panel had accordion layout. Both the child panels where shown then. But

  • 0

Initially this panel had accordion layout. Both the child panels where shown then. But as soon as I changed it to vbox, it shows the second panel. But no tree inside!

See the image.

enter image description here

Related Code

OurApp.online_tree_store = Ext.create('Ext.data.TreeStore', {
    root : {
        expanded : true,
        children : []
    }
});
OurApp.online_tree = Ext.create('Ext.tree.Panel', {
    store : OurApp.online_tree_store,
    title : 'Online',
    region: 'north',
    useArrows : true,
    rootVisible : false,
    listeners : {
        itemdblclick : contactitemdblclick
    }
});

/// Note: Offline tree is exactly the same as online tree.

Ext.create('Ext.panel.Panel', {
    closable : false,
    width : 300,
    maxWidth : 400,
    itemId : 'viewport-contacts',
    constrain : true,
    layout : 'accordion', // <--- layout changed to vbox or border
    region : 'west',
    hidden : true,
    border : true,
    defaults : {
        height : '50%', // <--- used for vbox
    },
    tbar : [{
        xtype : 'button',
        text : 'Sign out',
        iconCls : 'icon-disconnect',
        handler : function() {
        }
    }],
    items : [OurApp.online_tree, OurApp.offline_tree],
});
  • 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-13T17:33:04+00:00Added an answer on June 13, 2026 at 5:33 pm

    height: ‘50%’ should be flex: 1.

    You’ll also want to specify align: ‘stretch’

    Ext.require('*');
    
    Ext.onReady(function() {
    
        var panel = Ext.create('Ext.panel.Panel', {
            renderTo: document.body,
            width: 400,
            height: 400,
            layout: {
                type: 'vbox',
                align: 'stretch'
            },
            items: [{
                title: 'P1',
                flex: 1
            }, {
                title: 'P2',
                flex: 1
            }]
        });
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I initially asked this on Superuser, but somebody advised me to repost here. I
Initially I thought this was going to work, but now I understand it won't
I did something like this to initially hide the body scrollbar, and then show
Initially I had designed this flash based navigation menu for my website, after going
EDIT: This question was initially too general, I think. So What I really need
This question was initially misphrased, see the EDIT below. I'll leave it up for
This question was initially posted on Google Moderator for the AndroidDev Office Hours Hangout
Warning: This is inherited legacy code that was initially put together in the early
I have this jQuery datepicker code that initially set the minDate of the datepicker.
Initially my app's bundle identifier was the default MyCompany.${PRODUCT_NAME:rfc1034identifier} This wasn't matching the app

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.