1. #1
    Sencha Premium Member
    Join Date
    Aug 2011
    Posts
    38
    Vote Rating
    0
    zehavibarak is on a distinguished road

      0  

    Default Unanswered: Add floating panel to viewport

    Unanswered: Add floating panel to viewport


    Hi,
    I'm trying to add a floating panel to viewport (using insert()); I wish to have the panel "lose" it's floating behavior;
    This worked with 2.0.1 and now it doesn't (2.1.0)
    The other way around (fixed to floating) - does work;
    Please advise,

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    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


    You need to make it non floating:

    Code:
    var panel = new Ext.Panel({
        centered : true,
        width    : 200,
        height   : 200,
        html     : 'Test'
    });
    
    Ext.Viewport.add({
        items : [
            {
                xtype   : 'button',
                text    : 'Insert',
                handler : function(button) {
                    var cnt = button.up('container');
    
                    panel.setCentered(false);
    
                    cnt.add(panel);
                }
            }
        ]
    });
    
    Ext.Viewport.add(panel);
    
    panel.show();
    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
    Aug 2011
    Posts
    38
    Vote Rating
    0
    zehavibarak is on a distinguished road

      0  

    Default


    More like

    var panel = new Ext.Panel({ width : 200, height : 200, html : 'Test'});
    Ext.Viewport.add({ items : [ { xtype : 'button', text : 'Insert', handler : function(button) { panel.showBy(this);
    }}, { xtype : 'button', text : 'Insert1', handler : function(button) {
    Viewport.insert(0, panel); } } ]});

    Please advise

  4. #4
    Sencha Premium Member
    Join Date
    Aug 2011
    Posts
    38
    Vote Rating
    0
    zehavibarak is on a distinguished road

      0  

    Default


    Still not working

Thread Participants: 1

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