- Ext.js Tutorial
- Ext.js - Home
- Ext.js - Overview
- Ext.js - Environment Setup
- Ext.js - Naming Convention
- Ext.js - Architecture
- Ext.js - First Program
- Ext.js - Class System
- Ext.js - Containers
- Ext.js - Layouts
- Ext.js - Components
- Ext.js - Drag & Drop
- Ext.js - Themes
- Ext.js - Custom Events and Listeners
- Ext.js - Data
- Ext.js - Fonts
- Ext.js - Style
- Ext.js - Drawing
- Ext.js - Localization
- Ext.js - Accessibility
- Ext.js - Debugging Code
- Ext.js - Methods
- Ext.js Useful Resources
- Ext.js - Questions and Answers
- Ext.js - Quick Guide
- Ext.js - Useful Resources
- Ext.js - Discussion
Ext.js - Column Layout
This layout is to show multiple columns in the container. We can define a fixed or percentage width to the columns. The percentage width will be calculated based on the full size of the container.
Syntax
Following is a simple syntax to use the Column layout.
layout: 'column'
Example
Following is a simple example showing the usage of Column layout.
<!DOCTYPE html> <html> <head> <link href = "https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css" rel = "stylesheet" /> <script type = "text/javascript" src = "https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script> <script type = "text/javascript"> Ext.onReady(function() { Ext.create('Ext.panel.Panel', { renderTo : Ext.getBody(), layout : 'column' , xtype: 'layout-column', requires: ['Ext.layout.container.Column'], width : 600, items: [{ title : 'First Component width 30%', html : 'This is First Component', columnWidth : 0.30 },{ title : 'Second Component width 40%', html : '<p> This is Second Component </p> <p> Next line for second component </p>', columnWidth : 0.40 },{ title : 'Third Component width 30%', html : 'This is Third Component' , columnWidth : 0.30 }] }); }); </script> </head> <body> </body> </html>
The above program will produce the following result −
extjs_layouts.htm
Advertisements