Results 1 to 6 of 6

Thread: remove borders from viewport

  1. #1

    Default remove borders from viewport

    I'm starting just now learning ext 3 so i bought the MEAP edition of 'ExtJS in action''

    I've a blank body on an html file

    I want to create a simil-blog layout using a viewport with nord, center and east sections.

    Every thing works ok, but i'm not able to remove the borders from regions... how to?
    I used margins : '0' in ALL of regions, but nothing.

    help me please

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    regions do not have borders.

    Panels do.

    If you do not need to use a Panel, then don't use a Panel.

  3. #3

    Default

    I'm actually using this code:

    Code:
    Ext.onReady( function () { 
    	new Ext.Viewport ({
    		layout		: 'border',
    		shadow 		: 'false',
    		items		: [ 
    			{
    				region		: 'north',
    				height		: 100,
    				margins 	: {top:0, right:0, bottom: 0, left:0}
    			} , {
    				region		: 'center',
    				margins 	: {top:0, right:0, bottom:0, left:0}
    			} , {
    				region		: 'east',
    				width		: 120,
    				margins 	: {top:0, right:0, bottom:0, left:0}
    			}
    		]
    		
    	})
    });
    I want to thank you because your reply helped me. I opened API docs and looked for Panel.border.

    So i substituted margins { ... } with border: false and everything looks right. Thanks

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Yes.

    But as I said, why use Panels if you don't need to?

    You are not using any Panel specific capabilites there, so why are you using Panels?

  5. #5

    Default

    Code:
    Ext.onReady( function () { 
    	new Ext.Viewport ({
    		layout		: 'border',
    		shadow 		: 'false',
                    defaults :{ border : false},
    		items		: [ 
    			{
    				region		: 'north',
    				height		: 100,
    				margins 	: {top:0, right:0, bottom: 0, left:0}
    			} , {
    				region		: 'center',
    				margins 	: {top:0, right:0, bottom:0, left:0}
    			} , {
    				region		: 'east',
    				width		: 120,
    				margins 	: {top:0, right:0, bottom:0, left:0}
    			}
    		]
    		
    	})
    });

  6. #6
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    No, what I mean is

    Code:
    Ext.onReady( function () { 
    	new Ext.Viewport ({
    		layout		: 'border',
    		shadow 		: 'false',
                    defaultType        : 'box',
    		items		: [ 
    			{
    				region		: 'north',
    				height		: 100
    			} , {
    				region		: 'center',
    			} , {
    				region		: 'east',
    				width		: 120
    			}
    		]
    		
    	})
    });

Posting Permissions

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