Results 1 to 2 of 2

Thread: Viewport problems.. how to load a window in the center region in viewport

  1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    19
    Vote Rating
    0
      0  

    Default Viewport problems.. how to load a window in the center region in viewport

    hi...
    how can i load my window to my center region in viewport

    and my second problem is when clicking on the Visitor List button loads or show the form and clicking the Visitor List button a second time makes the form disappear. Any reason it would not reload itself?

    My viewport
    Code:
    var viewport = new Ext.Viewport({
    layout: 'border',
    renderTo: Ext.getBody(),
    items: [{
    		region: 'north',
    		xtype: 'panel'
    		,title: 'TEST'
    		,tbar:[{
    				xtype: 'tbspacer'
    			},{
    				xtype: 'tbbutton',
    				text: 'Visitor List',
    				handler: function(btn){
    					winvisitorlist.show();
    				}
    			}
    		]
    		},{
    			region: 'center',
    			xtype: 'panel'
    		}
    		,{
    			region: 'west'
    			,xtype: 'panel'
    			,width: 200
    			,title: 'Message'
    			,split: true
    			,collapsible:true
    		}]
    });
    my window
    Code:
    var winaddvisitor = new Ext.Window({
    	title: 'Visitor List',
    	id: 'helpwin',
    	width: 300,
    	height: 300,
    	modal: true,
    	tbar: [{
    		text: 'Add Visitor',
    		handler: function(){
    			winaddvisitor.show();
    		}
    		},{
    			text: 'Disable',
    			handler: function(t){
    				t.disable();
    			}
    		}
    	]
    });
    thanks

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    133
      0  

    Default

    Your visitor list shouldn't be a window at all.
    - Change visitorlist to be a panel.
    - Make your center region layout:'fit' (or 'card').
    - add() visitorlist to the center region and call doLayout.

Similar Threads

  1. Viewport with center region fit and autoscroll when i load content into
    By tombal93 in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 23 Aug 2010, 10:29 PM
  2. Tree Menu to display window in viewport center region
    By extjs_new in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 24 Dec 2008, 5:28 AM
  3. Tree Menu to display window in viewport center region
    By extjs_new in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Dec 2008, 7:22 AM
  4. how to Create a window in viewport center region
    By extjs_new in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 22 Dec 2008, 2:07 AM
  5. Load content to a Viewport's Center Region
    By pgraju in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 8 Sep 2008, 6:53 AM

Posting Permissions

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