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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:03:35+00:00 2026-05-14T01:03:35+00:00

I’m trying to get a layout to look like this : (source: yfrog.com )

  • 0

I’m trying to get a layout to look like this :
hbox with vbox right panel
(source: yfrog.com)

I’ve had all sorts of fun trying to get this working. I finally got something that almost works, but only because I dropped in the 3.2 beta of Ext JS.

I’m left with one final problem. The code below will display the panels almost correctly, however, the right hand panel doesn’t stretch to fill the right hand half of the container.

If I add a layout config (shown in the code commented out) and remove the layout attribute, then I end up with all three panels arranged vertically, rather than the two hbox panels being stretched to fill the space and the vbox panels being above one another.

I’d really appreciate someone passing an eye over the code below and pointing out what I’m missing or if I’ve encountered a bug in ExtJS 3.2b.

Thanks

Stephen

<html>
    <head>
        <script src="/script/ext/adapter/ext/ext-base-debug.js"></script>
        <script src="/script/ext/ext-all-debug.js"></script>
        <script type="text/javascript">
        Ext.BLANK_IMAGE_URL = '/script/ext/resources/images/default/s.gif';
        </script>

        <script type="text/javascript">
        Ext.onReady(function() {
            var detailPanel = {
                id : 'detail-panel',
                contentEl : 'pageDetail',
                title : 'Detail Panel'
            };

            var workflowPanel = {
                id : 'workflowpanel',
                title : 'Page Status',
                contentEl : 'pageWorkflow'
            };

            var accessPanel = {
                id : 'accesspanel',
                title : 'Page Access',
                contentEl: 'pageAccess'
            };

            var extraPanel = {
                title : 'extra panel',
                layoutConfig : {
                    type : 'vbox',
                    align : 'stretch',
                    pack : 'start'
                },
                defaults : {
                    flex : 1,
                    frame : true
                },
                items : [workflowPanel,accessPanel]
            };

            var overviewPanel = {
                layout : 'hbox',
/*              layoutConfig : {
                    type :'hbox',
                    align : 'stretch',
                    pack : 'start'
                },
*/              
                defaults :{
                    frame : true,
                    flex : 1
                },
                items : [detailPanel,extraPanel]
            };


            vp = new Ext.Viewport({
                items : [overviewPanel] ,
                renderTo : Ext.getBody()
            });

        });
        </script>

        <link rel="stylesheet" type="text/css" href="/script/ext/resources/css/ext-all.css" />
    </head>
    <body>
        <div id="overview" class="x-hidden">
            <div id="pageDetail">
                <dl>
                    <dt>Page URL</dt>
                    <dd>/contact/</dd>
                    <dt>Navigation Title</dt>
                    <dd>Get in touch...</dd>
                </dl>
                <dl>
                        <dt>Associate project to types</dt>
                        <dd>&nbsp;</dd>

                        <dt>Associate projects related to other projects</dt>
                        <dd>&nbsp;</dd>
                </dl>
            </div>
            <div id="pageExtra">
                <div id="pageWorkflow">
                    <em>Current Status</em><br>
                        Live on 08/03/2010 23:23 by username
                    <br/>
                    <em>Workflow</em><br>
                    Some status text
                    <dl>
                        <dt>Last Updated</dt>
                        <dd>07/03/2010 10:10</dd>
                        <dt>Updated by</dt>
                        <dd>username*</dd>
                    </dl>
                    <br/>
                </div>
                <div id="pageAccess">
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae neque risus, non elementum arcu. Donec et convallis ipsum. Vivamus nec viverra nunc.                  
                </div>
            </div>
        </div>      
    </body>
</html>
  • 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-05-14T01:03:35+00:00Added an answer on May 14, 2026 at 1:03 am

    So, after a lead from Jay Garcia I’ve fixed this in moments.

    I needed to set my viewport to be of layout type “fit”

    vp = new Ext.Viewport({
        layout : 'fit',
        items : [overviewPanel] ,
        renderTo : Ext.getBody()
    });
    

    then I needed to add the layout attribute into the vbox and the hbox (previously I found that the layout attribute with the layoutConfig type attribute screwed things up, so removed them)

                var extraPanel = {
                    title : 'extra panel',
                    layout : 'vbox',
                    layoutConfig : {
                        type : 'vbox',
                        align : 'stretch',
                        pack : 'start'
                    },
                    defaults : {
                        flex : 1,
                        frame : true
                    },
                    items : [workflowPanel,accessPanel]
                };
    
                var overviewPanel = {
                    layout : 'hbox',
                    layoutConfig : {
                        type :'hbox',
                        align : 'stretch',
                        pack : 'start'
                    },
                    defaults :{
                        frame : true,
                        flex : 1
                    },
                    items : [detailPanel,extraPanel]
                };
    

    Those 2 changes gave me a beautiful layout, exactly the way I wanted it to display.

    Thanks Jay (PS. go buy Jay’s book “ExtJS in Action” 😉 )

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

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.