Results 1 to 10 of 11

Thread: window maximize problem on desktop (example from the package) with tbar

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9583 in 4.2.1.883.
  1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Jakarta, Indonesia
    Posts
    9
    Vote Rating
    0
      0  

    Default window maximize problem on desktop (example from the package) with tbar

    I added a tbar in desktop (example from the package) but when the window is maximized, the tbar is behind the window.

    *EDIT BY SLEMMON
    Tested on 4.2 and 4.2.1.763

    Maximizing the child window with constrainHeader maximizes the window relative to the owning panel's el.
    Maximizing the child window with constrain maximizes the window relative to the owning panel's bodyEl.

    Code:
    var constrainedWin, constrainedWin2;                Ext.create('Ext.container.Viewport', {    layout: 'fit'    , items: [{        xtype: 'panel'        , dockedItems: [        {            dock: 'top',            xtype: 'toolbar',            height: 30,            items: [                {xtype:'tbtext', text:'Top Toolbar'}            ]        },        {            dock: 'bottom',            xtype: 'toolbar',            height: 30,            items: [                {xtype:'tbtext', text:'Bottom Toolbar'}            ]        }    ],    items: [        constrainedWin = Ext.create('Ext.window.Window', {            title: 'Window with constrainHeader',            width: 600,            height: 400,            x: 50,            y: 50,            constrainHeader: true,            maximizable: true,            html: 'This is a window with constrainHeader true'            , tbar: [{                text: 'Button'            }]        }),                constrainedWin2 = Ext.create('Ext.window.Window', {            title: 'Window with constrain',            width: 600,            height: 400,            constrain: true,            maximizable: true,            html: 'This is a window with constrain true'            , tbar: [{                text: 'Button'            }]        })    ]    }]});constrainedWin.show();constrainedWin2.show();
    Last edited by slemmon; 24 Apr 2013 at 9:40 AM. Reason: added additional test notes and inline test case

  2. #2
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      0  

    Default

    Hard to say - should be some straight forward coding.
    Can you reproduce the issue you're seeing with just a simple code snippet of a window/toolbar?

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Location
    Jakarta, Indonesia
    Posts
    9
    Vote Rating
    0
      0  

    Default

    I just add this code

    me.tbar = new Ext.toolbar.Toolbar();

    to the initComponent function in the desktop.js file. When I open a window from start menu and maximize it, the top toolbar on the desktop covered by the window. This is not happen when I used the 4.1.1a GPL version.

  4. #4
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      0  

    Default

    Not sure why you're seeing that behavior just my modifying the desktop demo. I take it that if you make a stand-alone example of a window with a toolbar it's working ok for you?

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Location
    Jakarta, Indonesia
    Posts
    9
    Vote Rating
    0
      0  

    Default

    Please check this out. The window with constrainHeader set to true covering the top toolbar when maximized, but not the other window.

    Code:
    Ext.onReady(function(){
                
                    var constrainedWin, constrainedWin2;
                    
                    Ext.create('Ext.panel.Panel', {
                        width: '100%',
                        height: '100%',                    
                        renderTo: Ext.getBody(),
                        dockedItems: [
                            {
                                dock: 'top',
                                xtype: 'toolbar',
                                height: 30,
                                items: [
                                    {xtype:'tbtext', text:'Top Toolbar'}
                                ]
                            },
                            {
                                dock: 'bottom',
                                xtype: 'toolbar',
                                height: 30,
                                items: [
                                    {xtype:'tbtext', text:'Bottom Toolbar'}
                                ]
                            }
                        ],
                        items: [
                            constrainedWin = Ext.create('Ext.window.Window', {
                                title: 'Window with constrainHeader',
                                width: 600,
                                height: 400,
                                x: 50,
                                y: 50,
                                constrainHeader: true,
                                maximizable: true,
                                html: 'This is a window with constrainHeader true'
                            }),
                            
                            constrainedWin2 = Ext.create('Ext.window.Window', {
                                title: 'Window with constrain',
                                width: 600,
                                height: 400,
                                constrain: true,
                                maximizable: true,
                                html: 'This is a window with constrain true'
                            })
                        ]                            
                    });
                    
                    constrainedWin.show();
                    constrainedWin2.show();
                    
                });

  6. #6
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      0  

    Default

    In your example the owning panel didn't honor the height of 100%.
    I modified the example somewhat to ensure the owning panel took up 100% of the screen real estate. Test with this and see if you still see an issue.

    Code:
    var constrainedWin, constrainedWin2;
                    
    Ext.create('Ext.container.Viewport', {
        layout: 'fit'
        , items: [{
            xtype: 'panel'
            , dockedItems: [
            {
                dock: 'top',
                xtype: 'toolbar',
                height: 30,
                items: [
                    {xtype:'tbtext', text:'Top Toolbar'}
                ]
            },
            {
                dock: 'bottom',
                xtype: 'toolbar',
                height: 30,
                items: [
                    {xtype:'tbtext', text:'Bottom Toolbar'}
                ]
            }
        ],
        items: [
            constrainedWin = Ext.create('Ext.window.Window', {
                title: 'Window with constrainHeader',
                width: 600,
                height: 400,
                x: 50,
                y: 50,
                constrainHeader: true,
                maximizable: true,
                html: 'This is a window with constrainHeader true'
            }),
            
            constrainedWin2 = Ext.create('Ext.window.Window', {
                title: 'Window with constrain',
                width: 600,
                height: 400,
                constrain: true,
                maximizable: true,
                html: 'This is a window with constrain true'
            })
        ]
        }]
    });
    
    
    constrainedWin.show();
    constrainedWin2.show();

  7. #7
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Posting Permissions

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