1. #1
    Sencha Premium Member
    Join Date
    Jul 2010
    Location
    Italy
    Posts
    9
    Vote Rating
    0
    raiworld81 is on a distinguished road

      0  

    Default Difficulty in creating a form

    Difficulty in creating a form


    Hi all,
    I'm trying tocreate a simplelogin formwith twotoolbars,dockedwitha'top' andthe other withdocked'bottom' anda central panel.
    When yourenderthisform, thecentral panelwith adockedtoolbaroverlapsthe'bottom'.I can notfigure out wheremistake.

    Code:
    Ext.define('Ext.FrontEnd.Login', {
        extend: 'Ext.Panel',
        alias: 'FrontEnd.Login',
        xtype: 'login',
        config: {
            items: [
                    {
                        docked: 'top',
                        xtype: 'toolbar',
                        title: 'Login',
                        items: [{ xtype: 'spacer' },
                            {
                                xtype: 'button',
                                ui: 'decline',
                                iconCls: 'delete',
                                iconMask: true,
                                handler: function() { this.destroy(); },
                                scope: this
                            }
                        ]
                    },
                    {
                        docked: 'bottom',
                        xtype: 'toolbar',
                        items: [{
                            xtype: 'button',
                            text: 'Submit',
                            iconMask: true,
                            ui: 'plain',
                            handler: this.EventClickBtnSubmit,
                            scope: this
                        }
                        ]
                    },
                        {
                            xtype: 'container',
                            items: [{
                                xtype: 'fieldset',
                                defaults: {
                                    required: true
                                },
                                items: [{
                                    xtype: 'textfield',
                                    label: this.fieldLabelUser
                                },
                                {
                                    xtype: 'passwordfield',
                                    label: this.fieldLabelPassword
                                }
                            ]
                    ]
                        }
                ]
        },
        constructor: function(params) {
            config = params || {};
    
    
            Ext.applyIf(config, params);
    
    
            this.callParent(arguments);
        },
        initialize: function() {
            this.callParent(arguments);
            this.show();
        }
    });


  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,668
    Vote Rating
    746
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This works fine for me:

    Code:
    Ext.define('Ext.FrontEnd.Login', {
        extend: 'Ext.Panel',
        xtype: 'login',
        config: {
            fullscreen : true,
            items: [
                {
                    docked: 'top',
                    xtype: 'toolbar',
                    title: 'Login',
                    items: [{ xtype: 'spacer' },
                        {
                            xtype: 'button',
                            ui: 'decline',
                            iconCls: 'delete',
                            iconMask: true,
                            handler: function() { this.destroy(); },
                            scope: this
                        }
                    ]
                },
                {
                    docked: 'bottom',
                    xtype: 'toolbar',
                    items: [{
                        xtype: 'button',
                        text: 'Submit',
                        iconMask: true,
                        ui: 'plain',
                        handler: this.EventClickBtnSubmit,
                        scope: this
                    }
                    ]
                },
                {
                    xtype: 'container',
                    items: [{
                        xtype: 'fieldset',
                        defaults: {
                            required: true
                        },
                        items: [{
                            xtype: 'textfield',
                            label: this.fieldLabelUser
                        },
                        {
                            xtype: 'passwordfield',
                            label: this.fieldLabelPassword
                        }]
                    }]
                }
            ]
        }
    });
    I added fullscreen to render the login, removed alias as you were using it wrong, constructor and initialize were removed as you didn't need them. One last thing to point out, you shouldn't use the Ext namespace, you should use one that is for your app.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2010
    Location
    Italy
    Posts
    9
    Vote Rating
    0
    raiworld81 is on a distinguished road

      0  

    Default


    Hello,
    thanks foryour answer,butusing the codeyou have entered, I can notsee thebottom toolbar withdocked.
    If it can be of help, instances of the component login as follows:
    Code:
    Ext.application({
        name: 'Sencha',
        launch: function() {
            Ext.create('FrontEnd.Login');
        }
    });

Thread Participants: 1

Tags for this Thread

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