Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/BoxComponent.html view on Meta::CPAN
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-BoxComponent-method-constructor'><span id='Ext-BoxComponent'>/**
</span></span> * @class Ext.BoxComponent
* @extends Ext.Component
* <p>Base class for any {@link Ext.Component Component} that is to be sized as a box, using width and height.</p>
* <p>BoxComponent provides automatic box model adjustments for sizing and positioning and will work correctly
* within the Component rendering model.</p>
* <p>A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing
* element, or one that is created to your specifications at render time. Usually, to participate in layouts,
* a Component will need to be a <b>Box</b>Component in order to have its width and height managed.</p>
* <p>To use a pre-existing element as a BoxComponent, configure it so that you preset the <b>el</b> property to the
* element to reference:<pre><code>
var pageHeader = new Ext.BoxComponent({
el: 'my-header-div'
});</code></pre>
* This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.</p>
* <p>To create a BoxComponent based around a HTML element to be created at render time, use the
* {@link Ext.Component#autoEl autoEl} config option which takes the form of a
* {@link Ext.DomHelper DomHelper} specification:<pre><code>
var myImage = new Ext.BoxComponent({
autoEl: {
tag: 'img',
src: '/images/my-image.jpg'
}
});</code></pre></p>
* @constructor
* @param {Ext.Element/String/Object} config The configuration options.
* @xtype box
*/
Ext.BoxComponent = Ext.extend(Ext.Component, {
// Configs below are used for all Components when rendered by BoxLayout.
<span id='Ext-BoxComponent-cfg-flex'> /**
</span> * @cfg {Number} flex
* <p><b>Note</b>: this config is only used when this Component is rendered
* by a Container which has been configured to use a <b>{@link Ext.layout.BoxLayout BoxLayout}.</b>
* Each child Component with a <code>flex</code> property will be flexed either vertically (by a VBoxLayout)
* or horizontally (by an HBoxLayout) according to the item's <b>relative</b> <code>flex</code> value
* compared to the sum of all Components with <code>flex</code> value specified. Any child items that have
* either a <code>flex = 0</code> or <code>flex = undefined</code> will not be 'flexed' (the initial size will not be changed).
*/
// Configs below are used for all Components when rendered by AnchorLayout.
<span id='Ext-BoxComponent-cfg-anchor'> /**
</span> * @cfg {String} anchor <p><b>Note</b>: this config is only used when this Component is rendered
* by a Container which has been configured to use an <b>{@link Ext.layout.AnchorLayout AnchorLayout} (or subclass thereof).</b>
* based layout manager, for example:<div class="mdetail-params"><ul>
* <li>{@link Ext.form.FormPanel}</li>
* <li>specifying <code>layout: 'anchor' // or 'form', or 'absolute'</code></li>
( run in 0.627 second using v1.01-cache-2.11-cpan-b50b6a40fd4 )