Results 1 to 3 of 3

Thread: Bbar position within a panel within a tabpanel

  1. #1

    Post Bbar position within a panel within a tabpanel

    Hi

    I have a bbar toolbar within a panel. The panel itself is contained within a tabpanel and this is contained within the center region of a viewport. The problem I'm having is that the toolbar is rendered just off the bottom of the browser. If I resize the browser and force a resize the toolbar comes into view. What I want to happen is for the panel with the toolbar to fill the whole containing tabpanel.

    Here are the relevant bits. My panel with the bbar is defined in this way:

    Code:
    function getFormPanel(config) {
        return new Ext.Panel(Ext.apply({
    
            closable: true,
            title: 'New quotation',
            collapsible: true,
            layout: 'card',
            border : false,
            activeItem:0,
            defaultType: 'field',
            items : [
                getPageOneLayout()
    ],
            bbar : [{
                text : 'Back', 
                handler : handleNav,
                icon: 'images/icons/back.png'
                },'-',
            {
                text : 'Forward',
                handler : handleNav,
                icon: 'images/icons/forward.png',
                iconAlign: 'right'
            },'->',
            {
            xtype : 'box', 
            id : 'indicator',
            style : 'margin-right: 5px',
            autoEl : {
            tag : 'div',
            html : '1 of 4' +
                   ''
            }
    
            }
            ]}));
    My tabPanel is defined like this:

    Code:
    var tabs = new Ext.TabPanel({
        deferredRender: false,
        resizeTabs:true,
        minTabWidth: 115,
        tabWidth:135,
        enableTabScroll:true,
        plugins: new Ext.ux.TabCloseMenu()
    });
    and the center part of my viewport like this:

    Code:
    {
                    xtype: 'panel',
                    layout: 'fit',
                    region: 'center',
                    tbar:  [
                        quotationMenuBtn
                    ],
                    items: [tabs]
                }
    I'm adding tabs like this:

    Code:
    function addTab(){
        tabs.add(getQuotationFormPanel()).show();
    }
    Any help would be appreciated.

    Best DF

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    question: why wrap a panel around the tab panel? Why not just give it a tbar and place it in the center region?

  3. #3
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    be sure to call doLayout after the add call.

Posting Permissions

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