4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-layout-container-VBox'>/**
19 </span> * A layout that arranges items vertically down a Container. This layout optionally divides available vertical space
20 * between child items containing a numeric `flex` configuration.
22 * This layout may also be used to set the widths of child items by configuring it with the {@link #align} option.
25 * Ext.create('Ext.Panel', {
28 * title: "VBoxLayout Panel",
33 * renderTo: document.body,
36 * title: 'Inner Panel One',
42 * title: 'Inner Panel Two',
48 * title: 'Inner Panel Three',
54 Ext.define('Ext.layout.container.VBox', {
56 /* Begin Definitions */
58 alias: ['layout.vbox'],
59 extend: 'Ext.layout.container.Box',
60 alternateClassName: 'Ext.layout.VBoxLayout',
64 <span id='Ext-layout-container-VBox-cfg-align'> /**
65 </span> * @cfg {String} align
66 * Controls how the child items of the container are aligned. Acceptable configuration values for this property are:
68 * - **left** : **Default** child items are aligned horizontally at the **left** side of the container
69 * - **center** : child items are aligned horizontally at the **mid-width** of the container
70 * - **stretch** : child items are stretched horizontally to fill the width of the container
71 * - **stretchmax** : child items are stretched horizontally to the size of the largest item.
73 align : 'left', // left, center, stretch, strechmax
76 alignCenteringString: 'center',
80 direction: 'vertical',
82 // When creating an argument list to setSize, use this order
84 perpendicularSizeIndex: 0,
86 parallelPrefix: 'height',
87 parallelPrefixCap: 'Height',
90 parallelBefore: 'top',
91 parallelBeforeCap: 'Top',
92 parallelAfter: 'bottom',
93 parallelPosition: 'y',
95 perpendicularPrefix: 'width',
96 perpendicularPrefixCap: 'Width',
99 perpendicularLeftTop: 'left',
100 perpendicularRightBottom: 'right',
101 perpendicularPosition: 'x',
102 configureItem: function(item) {
104 item.layoutManagedHeight = 1;
106 item.layoutManagedHeight = 2;
109 if (this.align === 'stretch' || this.align === 'stretchmax') {
110 item.layoutManagedWidth = 1;
112 item.layoutManagedWidth = 2;
114 this.callParent(arguments);