Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
    don_bm is on a distinguished road

      0  

    Default [OPEN-325] Layout Issue: 2 Sections in VBox, Make One Fill Available Space

    [OPEN-325] Layout Issue: 2 Sections in VBox, Make One Fill Available Space


    Sencha Touch version tested:
    • 0.94
    Platform tested against:
    • iOS 4
    Description:
    • 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.
    Test Case:

    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]
            });
        }
    });

  2. #2
    Ext User
    Join Date
    Jun 2010
    Posts
    63
    Vote Rating
    0
    orangechicken is on a distinguished road

      0  

    Default


    Confirmed here. Flex just doesn't seem to work in 0.94

  3. #3
    Ext User
    Join Date
    Jun 2010
    Posts
    63
    Vote Rating
    0
    orangechicken is on a distinguished road

      0  

    Default


    I think I might have found a possible reason. It seems that in setFlexedItems and onLayout on the box layout it looks if *direction* == 'horizontal'. But, for some reason, VBox sets *orientation* to 'vertical' and not *direction*... Strange that there are two different variables for the same thing. Maybe it was a global search and replace miss?

    Changing direction to orientation fixes flex behavior in VBoxes.

  4. #4
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    Please test it against 0.95.

  5. #5
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
    don_bm is on a distinguished road

      0  

    Default


    Quote Originally Posted by BrendanC View Post
    Please test it against 0.95.
    I just tested w/ 0.95 and I get the same results. The 'content' section isn't taking the remaining space.

  6. #6
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
    don_bm is on a distinguished road

      0  

    Default


    Quote Originally Posted by don_bm View Post
    I just tested w/ 0.95 and I get the same results. The 'content' section isn't taking the remaining space.
    Any word on this? The status is still INFOREQ and this bug is holding up our development. We need to use NestedList and I know the API has changed after 0.93.

  7. #7
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    Thanks for the bug report.

  8. #8
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Hi don_bm,

    I have looked at your code and changed it so it now works in .93 and the latest version of Touch:

    Code:
    var content = new Ext.Panel({
        flex:1,
        style: 'border: 5px solid #666666',
        html: 'Content'
    });
    var video = new Ext.Panel({
        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({
        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]
            });
        }
    });
    There is no need for layout: 'fit' in all your panels, they will automatically stretch to fit an area. On the panel you wanted to flex (var content), I simply added flex:1, which should be what you are looking for.

  9. #9
    Ext User
    Join Date
    Sep 2010
    Posts
    21
    Vote Rating
    0
    don_bm is on a distinguished road

      0  

    Default


    Quote Originally Posted by rdougan View Post
    Hi don_bm,

    I have looked at your code and changed it so it now works in .93 and the latest version of Touch:
    Hi rdougan,

    I've tried your code but it doesn't work for 0.95. It does work for 0.93 (and I do realize that the original code I posted didn't even work for 0.93, the flex property should be outside the layout object). Can you verify this and reopen this bug?

    EDIT: By "latest version of Touch" do you mean an unreleased version? I assumed you meant 0.95

  10. #10
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Sorry, I only tested on .93 and the latest version (unreleased) of touch. .96 will be out on Tuesday.

Similar Threads

  1. Replies: 1
    Last Post: 24 Sep 2010, 6:36 AM
  2. Layout Question: 2 Sections in VBox, Make One Fill Available Space
    By don_bm in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 14 Sep 2010, 10:31 AM
  3. [OPEN-770] vbox layout with collapsible items
    By vladsch in forum Ext 3.x: Bugs
    Replies: 11
    Last Post: 12 Aug 2010, 12:08 PM
  4. [OPEN][3.1] VBox Form Example issue - Opera
    By mike1993 in forum Ext 3.x: Bugs
    Replies: 0
    Last Post: 23 Dec 2009, 10:45 AM
  5. Nested panel doesn't fill open space after collapsing parent panel
    By michiel in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 22 Aug 2007, 6:46 AM

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar