Results 1 to 3 of 3

Thread: Layout engine changes from 2.0.2 to 2.1.1

  1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    111
    Answers
    5
    Vote Rating
    1
      0  

    Default Layout engine changes from 2.0.2 to 2.1.1

    Hey, I just upgraded my Sencha touch library to 2.1.1 from 2.0.2. Looks like there was another major layout engine change.

    I've noticed my Ext.form.Panel are no longer filling their container. How do I implement the following layout with sencha touch 2.1.1,

    In Sencha touch 2.0.2 this layout looks like this,
    http://screencast.com/t/u0oO5hoktAQ

    In Sencha touch 2.1.1 this layout looks like this,
    http://screencast.com/t/kEo64X5bk

    This is a simple example, but this issue is reoccurring in other places with a dynamic number of items. I cannot just add a static height to the form elements because of this.

    Code:
    Ext.define('app.view.login.LogoPanel', {
        extend:'Ext.Panel',
        alias:['widget.logopanel'],
        config:{
            margin:'10 0 0 0',
            items:[
                {
                    html:"<p class='logo-image'></p>"
                }
            ]
        }
    });
    Code:
    Ext.define('app.view.login.LoginForm', {
        extend:'Ext.form.Panel',
        alias:['widget.loginform'],
        config:{
            scrollable:false,
            padding:10,
            items:[
                {
                    xtype:'textfield',
                    placeHolder:'Username',
                    name:'username'
                },
                {
                    xtype:'passwordfield',
                    placeHolder:'Password',
                    name:'password'
                },
                {
                    xtype:'button',
                    text:'Login',
                    itemId:'login'
                }
            ]
        },
        constructor:function (config) {
            this.callParent(arguments);
        }
    });
    Code:
    Ext.define('app.view.login.Panel', {    extend:'Ext.Panel',
        alias:['widget.loginpanel'],
        config:{
            fullscreen:true,
            scrollable:true,
            items:[
                {
                    xtype:'toolbar',
                    docked:'top',
                    title:'Login',
                    items:[
                        {
                            xtype:'container',
                            flex:1
                        }
                    ]
                },
                {
                    xtype:'logopanel'
                },
                {
                    xtype:'loginform',
                    flex:1
                },
                {
                    xtype:'container',
                    flex:1
                }
            ]
        },
        constructor:function (config) {
            this.callParent(arguments);
        }
    });

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    The DOM for a form has changed quite a bit, you need to use a layout manager like vbox on your app.view.login.Panel component.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Posts
    111
    Answers
    5
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    The DOM for a form has changed quite a bit, you need to use a layout manager like vbox on your app.view.login.Panel component.
    Hey Mitchell, I've tried playing with the layouts for awhile last Friday and I am continuing today. When I add a vbox layout the overflow is hidden like this, http://screencast.com/t/FxVSqxcQ

    I will keeping fighting the layout manager, but any suggestions are welcome.

    Thanks

Tags for this Thread

Posting Permissions

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