Results 1 to 5 of 5

Thread: [Ext 4.1.1] Window maximized fail

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7185 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2010
    Location
    Ukraine
    Posts
    51
    Vote Rating
    3
      0  

    Default [Ext 4.1.1] Window maximized fail

    PHP Code:
          Ext.onReady(function(){
            
    Ext.create('Ext.container.Viewport', {
              
    layout'border',
              
    disabledfalse,
              
    items: [
                
    Ext.create('Ext.panel.Panel', {
                  
    height42,
                  
    margins0,
                  
    region'north',
                  
    baseCls'x-plain'
                
    }),
                
    Ext.create('Ext.panel.Panel', {
                  
    margins0,
                  
    region'center',
                  
    id'mainPanel',
                  
    layout: {
                    
    type'hbox',
                    
    align'stretch'
                  
    },
                  
    items:[
                    
    Ext.create('Ext.panel.Panel', {
                      
    width300,
                      
    margins0,
                      
    borderfalse,
                      
    autoScrolltrue,
                      
    bodyStyle'background:#eee;',
                      
    items:[{
                        
    xtype'treepanel',
                        
    flex1,
                        
    collapsibletrue,
                        
    titleCollapsetrue,
                        
    margin10,
                        
    frametrue,
                        
    rootVisiblefalse,
                        
    linesfalse,
                        
    listeners: {
                          
    itemclick: function(view,rec,item,index,e,opt){
                            
    rec.raw.handler(rec.id);
                          },
                          
    itemdblclick: function(){
                            return 
    false;
                          }
                        },
                        
    title'Menu title',
                        
    store:  Ext.create('Ext.data.TreeStore', {
                          
    root: {
                            
    expandedtrue,
                            
    children: [{
                              
    text'Open maximized window',
                              
    leaftrue,
                              
    handler: function(id){
                                
    Ext.create('Ext.window.Window', {
                                  
    autoShowtrue,
                                  
    width600,
                                  
    height400,
                                  
    constrainHeadertrue,
                                  
    renderToExt.get('mainPanel'),
                                  
    maximizabletrue,
                                  
    maximized:true,
                                  
    html'Why can drag this window?',
                                  
    minimizablefalse
                                
    });
                              }
                            }]
                          }
                        })
                      }]
                    }),
                    
    Ext.create('Ext.panel.Panel', {
                      
    margins0,
                    })
                  ]
                })
              ]
            });
          }); 
    Tested:
    windows 7 x64 sp1
    chrome 21

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Vote Rating
    1367
      0  

    Default

    Are you meaning to only constrain it to the center region and not the entire browser window?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,756
    Vote Rating
    81
      0  

    Default

    use an xtype: 'window' as a child item of the mainPanel.

    Then you can access it using CQ whenever you need.

    Don't forget closeAction: 'hide'
    Longtime Sencha engineer. Now surplus to requirements apparently...

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Location
    Ukraine
    Posts
    51
    Vote Rating
    3
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Are you meaning to only constrain it to the center region and not the entire browser window?
    yes

  5. #5
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,968
    Vote Rating
    931
      0  

    Default

    Agreed, you shouldn't be able to drag that window.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Tags for this Thread

Posting Permissions

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