O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying content in columns

The ColumnLayout is used for creating multi-column layouts. The width of each column can be specified as fixed (in pixels), as a percentage, or a mixture of both.

This recipe will demonstrate creating a three column layout with one fixed width column and two columns with widths specified as percentages:

Displaying content in columns

How to do it...

  1. Start by creating a panel rendered to the document's body:
    Ext.create('Ext.Panel', {
        title: 'Column Layout',
        width: 500,
        height: 200,
        renderTo: Ext.getBody()
    });
  2. Add three child panels to the parent's items collection:
    Ext.create('Ext.Panel', { title: 'Column Layout', width: 500, height: 200, items: [{ title: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required