Using Layout Managers:: Content panes use BorderLayout by default. If you don't like the default layout (or, actually, to its viewport), you either specify the component in the http://life.csu.edu.au/java-tut/uiswing/layout/using.htmlHOME | Hi,
With Ext 1.0, I use this :
layout = new YAHOO.ext.BorderLayout('layouts', {...
How can I do the same with 2.0 ? I mean, I want Ext be active on 'layout' id, and not on 'body' wich is the default.
var viewport = new Ext.Viewport({
layout: 'border',
items: [new Ext.BoxComponent({ // raw
region: 'center',
el: 'center',
height: 47
})]
});
Hi,
This problem is not a Qcodo problem, and not a ExtJS problem. This is a problem of users who uses both frameworks. Am I the only one? I think this is really a powerful duo, and it's a bit sad if they can't work together... Help with layouts - Ext JS Forums:: 9 posts - Last post: Jun 6, 2008setLayout(new BorderLayout()); viewport.setLayoutOnChange(true); LayoutContainer panel = new ContentPanel(); final VerticalPanel content http://www.yui-ext.net/forum/showthread.php?t=37688HOME | 001 /* 002 * $Id: WorldMapWindow.java,v 1.3 2007/04/18 13:01:13 :: SOUTH); 209 210 final JPanel contentPane = new JPanel(new BorderLayout(4, 4)); 211 contentPane. getScale(); 239 final JViewport viewport = _scrollPane. http://www.array.ca/nest2/devel-upload/web/apidoc/src-html/org/esa/beam/framework/ui/WorldMapWindow.htmlHOME |
I open a thread on QCodo forum.
http://qcodo.com/forums/topic.php/2775
(and also http://qcodo.com/forums/topic.php/2762/1)
If you are not using Ext.Viewport you will need to resize the container yourself.
If you set monitorResize:true you could use:
container.doLayout = tp.doLayout.createInterceptor(function (){
var pos = this.getPosition(false);
this.setSize(Ext.lib.Dom.getViewportWidth() - pos[0], Ext.lib.Dom.getViewportHeight() - pos[1]);
}, container);
hi, Swing Chapter 16. (Advanced topics) Desktops and Internal Frames :: getWindowWatcher().getWidth()-15,. view.getViewPosition().y + 5);. } };. viewport.addComponentListener(ca);. getContentPane().setLayout(new BorderLayout( )); http://www.javafaq.nu/java-bookpage-27-5.htmlHOME | import java.awt.*; import java.awt.image.*; import javax.swing :: setOpaque( false ); Component c = viewport.getView(); if (c instanceof JComponent) boxes.add( new JCheckBox("Two") ); south.add(buttons, BorderLayout. http://www.discoverteenergy.com/files/ImagePanel.javaHOME |
thanks for the idea. I used a Panel like this :
var viewport = new Ext.Panel({
layout: 'border',
renderTo: 'mainLayout', //document.body,
width:'100%',
height:'100%',
monitorResize: true,
items: [northPanel, westPanel, centerPanel]
});
This works, but there is a last problem about height : 100% works fine for the width,but not for the height. Any idea to solve this ?
This is an important point, because this is about compatibility with use of QCodo PHP/JS Framework (If render is done on 'body', as with Ext.Viewport, QCodo Framework is not usable with ExtJS 2.0).
thanks for help.
Don't think you can. Viewport is defined to be the entire browser window so you can't have anything outside of it. Just use a panel with a border layout. You should still get basically the same results.
Nortel Unveils Vision, Strategy for Israeli High-Performance Net
Busy Friday Leads to Strong Close for Net Stocks
|