Clear Up
SharpKit Reference

Default Class

Namespace: Ext.layout

Base Types

System.Object

Constructors

Properties

Name Description
DIRECTION_HORIZONTAL
DIRECTION_VERTICAL
extend The Default Layout is the layout that all other layouts inherit from. The main capability it provides is docking, which means that every other layout can also provide docking support. It's unusual to use Default layout directly, instead it's much more common to use one of the sub classes: * {@link Ext.layout.HBox hbox layout} * {@link Ext.layout.VBox vbox layout} * {@link Ext.layout.Card card layout} * {@link Ext.layout.Fit fit layout} For a full overview of layouts check out the [Layout Guide](#!/guide/layouts). ## Docking Docking enables you to place additional Components at the top, right, bottom or left edges of the parent Container, resizing the other items as necessary. For example, let's say we're using an {@link Ext.layout.HBox hbox layout} with a couple of items and we want to add a banner to the top so that we end up with something like this: {@img ../guides/layouts/docktop.jpg} This is simple to achieve with the *dock: 'top'* configuration below. We can dock as many of the items as we like, to either the top, right, bottom or left edges of the Container: Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', items: [ { dock: 'top', height: 20, html: 'This is docked to the top' }, { html: 'message list', flex: 1 }, { html: 'message preview', flex: 2 } ] }); Similarly, to dock something to the left of a layout (a {@link Ext.layout.VBox vbox} in this case), such as the following: {@img ../guides/layouts/dockleft.jpg} We can simply dock to the left: Ext.create('Ext.Container', { fullscreen: true, layout: 'vbox', items: [ { dock: 'left', width: 100, html: 'This is docked to the left' }, { html: 'message list', flex: 1 }, { html: 'message preview', flex: 2 } ] }); We can also dock to the bottom and right and use other layouts than hbox and vbox ({@link Ext.layout.Card card} and {@link Ext.layout.Fit fit} layouts both accept docking too).
isLayout
POSITION_END
POSITION_START
© Copyright 2005-2011 SharpKit. All rights reserved.