Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    2
    Vote Rating
    0
    dsuckau is on a distinguished road

      0  

    Default Unanswered: Detach tabs from tabpanel

    Unanswered: Detach tabs from tabpanel


    Hey,

    I want do to the following: I have a tabpanel, which contains some simple panels. I need the panels to be detached from the tabpanel, on drag or something.

    Another possibility would be, that the tabpanel contains windows, instead of panels. And if you maximize the windows, their titles should be added as tabs to the tabpanel. And on drag on the tabs, you get your normal windows back.

    I already tried the last version, but the title of the window does not become a tab.

    Any ideas?

    Greets from Germany

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,863
    Answers
    651
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    This might get you going in the right direction:
    http://www.sencha.com/forum/showthread.php?244892

    You would have to perform the detach yourself.

    SCott.

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    2
    Vote Rating
    0
    dsuckau is on a distinguished road

      0  

    Default


    Sorry, but that is not what i meant.

    The behaviour I wanted to describe, is the same like in text editors like Sublime Text. You have a tab for each of your opened files, but you can make an own window of each tab.

    Animal posted a solution in this thread:
    http://www.sencha.com/forum/showthre...anels-in-ExtJS

    I changed it a little bit and made a class of it, because I need it generic:

    PHP Code:
    /**
     * A panel that is able to undock from a tab panel into a window.
     */
    Ext.define('MyApp.view.UndockablePanel', {

        
    extend'Ext.panel.Panel',
        
    alias'widget.undockablepanel',

        
    /**
         * The superior tab panel.
         * @property {?Ext.tab.Panel} [tabPanel=null]
         * @readonly
         */
        
    tabPanelnull,

        
    /**
         * True when panel is undocked into a window.
         * @property {Boolean} [undocked=false]
         * @readonly
         */
        
    undockedfalse,

        
    /**
         * The window that contains the panel when it is undocked.
         * @property {?Ext.window.Window} [win=null]
         * @readonly
         */
        
    winnull,

        
    /**
         * Docks the panel to the superior tab panel.
         * @return {void}
         */
        
    dock: function () {

            var 
    tabPanel this.tabPanel;
            if (!
    tabPanel || (!tabPanel instanceof Ext.tab.Panel)) {
                return;
            }

            
    this.win.remove(thisfalse);
            
    tabPanel.add(this);
            
    this.win.destroy();
            
    tabPanel.setActiveTab(this);

            
    this.undocked false;
            
    this.win null;

        },

        
    /**
         * Undocks the panel from the superior tab panel.
         * @return {void}
         */
        
    undock: function () {

            var 
    tabPanel this.ownerCt;
            if (!
    tabPanel || (!tabPanel instanceof Ext.tab.Panel)) {
                return;
            }
            
    tabPanel.remove(thisfalse);

            var 
    win Ext.create('Ext.window.Window', {
                
    renderTotabPanel.getEl(),
                
    constraintrue,
                
    titlethis.title,
                
    layout'fit',
                
    itemsthis,
                
    tools: [
                    {
                        
    type'pin',
                        
    scopethis,
                        
    handlerthis.dock
                    
    }
                ]
            });

            
    win.setWidth(800);
            
    win.setHeight(400);
            
    win.center();
            
    win.show();

            
    this.undocked true;
            
    this.tabPanel tabPanel;
            
    this.win win;

        }

    }); 
    But now I still have a problem. With only one tab it works perfectly, with with more than one, only the last panel with be moved into its window

    PHP Code:
    var container = {
        
    xtype'tabpanel',
        
    items: [
            {
                
    xtype'undockablepanel',
                
    title'Tab 1',
                
    id'foo',
                
    tbar: [
                    {
                        
    xtype'button',
                        
    text'Button 1'
                    
    },
                    
    '->',
                    {
                        
    xtype'button',
                        
    text'Undock',
                        
    handler: function () {
                            
    this.up('undockablepanel').undock();
                        }
                    }
                ]
            },
            {
                
    xtype'undockablepanel',
                
    title'Tab 2',
                
    id'foo2',
                
    tbar: [
                    {
                        
    xtype'button',
                        
    text'Button 2'
                    
    },
                    
    '->',
                    {
                        
    xtype'button',
                        
    text'Undock',
                        
    handler: function () {
                            
    this.up('undockablepanel').undock();
                        }
                    }
                ]
            },
            {
                
    xtype'undockablepanel',
                
    title'Tab 3',
                
    id'foo3',
                
    tbar: [
                    {
                        
    xtype'button',
                        
    text'Button 3'
                    
    },
                    
    '->',
                    {
                        
    xtype'button',
                        
    text'Undock',
                        
    handler: function () {
                            
    this.up('undockablepanel').undock();
                        }
                    }
                ]
            },
            {
                
    xtype'undockablepanel',
                
    title'Tab 4',
                
    id'foo4',
                
    tbar: [
                    {
                        
    xtype'button',
                        
    text'Button 4'
                    
    },
                    
    '->',
                    {
                        
    xtype'button',
                        
    text'Undock',
                        
    handler: function () {
                            
    this.up('undockablepanel').undock();
                        }
                    }
                ]
            }
        ]
    }; 

Thread Participants: 1