Results 1 to 4 of 4

Thread: Layout Question: 2 Sections in VBox, Make One Fill Available Space

  1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
      0  

    Default Layout Question: 2 Sections in VBox, Make One Fill Available Space

    I'm having a difficult time getting this to work. I have a layout w/ the top most Panel using an hbox w/ left and main items. The left section uses a VBox with 2 items: content and a video. I want the content section to take the remaining space and I can't seem to get it to work w/ 0.94. It worked fine on 0.93. Here's my code:

    Code:
    var content = new Ext.Panel({
        layout: {
            type: 'fit',
            align: 'stretch',
            flex: 2
        },
        style: 'border: 5px solid #666666',
        html: 'Content'
    });
    var video = new Ext.Panel({
        layout: 'fit',
        style: 'border: 5px solid #666666',
        width: 320,
        height: 240,
        html: 'Video'
    });
    var left = new Ext.Panel({
        layout: {
            type: 'vbox',
            align: 'stretch',
            pack: 'end'
        },
        width: 320,
        items: [content, video]
    });
    var center = new Ext.Panel({
        layout: 'fit',
        flex: 2,
        style: 'border: 5px solid #666666',
        html: 'Center'
    });
    
    Ext.setup({
        onReady: function() {
            var homeScreen = new Ext.Panel({
                layout: {
                    type: 'hbox',
                    align: 'stretch',
                    pack: 'start'
                },
                fullscreen: true,
                items: [left, center]
            });
        }
    });
    I'm just getting started w/ Sencha Touch and I do not have any experience with Ext JS so please let me know if I'm doing anything wrong. Thanks!

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,213
    Vote Rating
    1007
      0  

    Default

    Aside from some redundant layout stuff, looks like a bug.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
      0  

    Default

    Okay, thanks. I was going cross-eyed trying to figure out what was wrong. Any idea what version this will get fixed in? I updated to 0.94 to use the refactored NestedList, which is all coded now. I'd rather not revert the new coding just to change it back again to work with 0.94+

  4. #4
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by don_bm View Post
    Okay, thanks. I was going cross-eyed trying to figure out what was wrong. Any idea what version this will get fixed in? I updated to 0.94 to use the refactored NestedList, which is all coded now. I'd rather not revert the new coding just to change it back again to work with 0.94+
    Please ignore, will post to the bug forum

Similar Threads

  1. trying to hide button in a vbox, but leaves empty space
    By bareflix in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 27 Jul 2010, 8:27 AM
  2. VBOX Layout Question
    By Bleak in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 20 Apr 2010, 6:53 AM
  3. Get viewport to fill up space on page
    By geewhizbang in forum Ext 3.x: Help & Discussion
    Replies: 11
    Last Post: 14 Aug 2009, 1:15 AM
  4. [SOLVED]A question with Vbox and Hbox Layout
    By kohyea in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 28 Jul 2009, 10:34 AM
  5. Newbie: How to have panel fill to available space
    By PulpMysteryFan in forum Ext 2.x: Help & Discussion
    Replies: 11
    Last Post: 12 Dec 2008, 12:23 AM

Posting Permissions

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