X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/output/Ext.Toolbar.TextItem.html diff --git a/docs/output/Ext.Toolbar.TextItem.html b/docs/output/Ext.Toolbar.TextItem.html index bae66515..0ac26266 100644 --- a/docs/output/Ext.Toolbar.TextItem.html +++ b/docs/output/Ext.Toolbar.TextItem.html @@ -1,9 +1,9 @@ -
Observable Component BoxComponent Toolbar.Item Toolbar.TextItem
Package: | Ext |
Defined In: | Toolbar.js |
Class: | Toolbar.TextItem |
Extends: | Toolbar.Item |
xtype: | tbtext |
new Ext.Panel({
- tbar : [
- {xtype: 'tbtext', text: 'Item 1'} // or simply 'Item 1'
- ]
+Observable
Component
BoxComponent
Toolbar.Item
Toolbar.TextItem
Class Ext.Toolbar.TextItem
Package: Ext Defined In: Toolbar.js Class: Toolbar.TextItem Extends: Toolbar.Item
A simple class that renders text directly into a toolbar
+(with css class:'xtb-text'). Example usage:
+new Ext.Panel({
+ tbar : [
+ {xtype: 'tbtext', text: 'Item 1'} // or simply 'Item 1'
+ ]
});
Config Options
Config Options Defined By allowDomMove : BooleanWhether the component can move the Dom node when rendering (defaults to true). Component anchor : StringNote: this config is only used when this Component is rendered
by a Container which has been configured to use an Anc...Note: this config is only used when this Component is rendered
by a Container which has been configured to use an AnchorLayout
@@ -86,7 +86,9 @@ result in elements needing to be synchronized with the new height. Example:
<
}
}
}
-}).show(); BoxComponent autoShow : BooleanTrue if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
+}).show(); BoxComponent autoScroll : Booleantrue to use overflow:'auto' on the components layout element and show scroll bars automatically when
+necessary, false...true
to use overflow:'auto' on the components layout element and show scroll bars automatically when
+necessary, false
to clip any overflowing content (defaults to false
). BoxComponent autoShow : BooleanTrue if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
them on render...True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
them on render (defaults to false). Component autoWidth : BooleanTrue to use width:'auto', false to use fixed width (or allow it to be managed by its parent
Container's layout manage...True to use width:'auto', false to use fixed width (or allow it to be managed by its parent
@@ -118,7 +120,15 @@ child items when the browser changes its width:
var myPanel = <
}, {
title: 'Box 3'
}],
-});
BoxComponent clearCls : StringThe CSS class used to to apply to the special clearing div rendered
+}); BoxComponent boxMaxHeight : NumberThe maximum value in pixels which this BoxComponent will set its height to.
+Warning: This will override any size mana...The maximum value in pixels which this BoxComponent will set its height to.
+Warning: This will override any size management applied by layout managers.
BoxComponent boxMaxWidth : NumberThe maximum value in pixels which this BoxComponent will set its width to.
+Warning: This will override any size manag...The maximum value in pixels which this BoxComponent will set its width to.
+Warning: This will override any size management applied by layout managers.
BoxComponent boxMinHeight : NumberThe minimum value in pixels which this BoxComponent will set its height to.
+Warning: This will override any size mana...The minimum value in pixels which this BoxComponent will set its height to.
+Warning: This will override any size management applied by layout managers.
BoxComponent boxMinWidth : NumberThe minimum value in pixels which this BoxComponent will set its width to.
+Warning: This will override any size manag...The minimum value in pixels which this BoxComponent will set its width to.
+Warning: This will override any size management applied by layout managers.
BoxComponent clearCls : StringThe CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide...The CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide field clearing (defaults to
'x-form-clear-left').
@@ -128,7 +138,21 @@ manager (e.g. fieldLabel is specified or isFormField=true is specified.
See Ext.layout.FormLayout.fieldTpl also.
Component cls : StringAn optional extra CSS class that will be added to this component's Element (defaults to ''). This can be
useful for ...An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be
-useful for adding customized styles to the component or any of its children using standard CSS rules. Component ctCls : StringAn optional extra CSS class that will be added to this component's container. This can be useful for
+useful for adding customized styles to the component or any of its children using standard CSS rules. Component contentEl : StringOptional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
+for this comp...Optional. Specify an existing HTML element, or the id
of an existing HTML element to use as the content
+for this component.
+
+- Description :
+This config option is used to take an existing HTML element and place it in the layout element
+of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.
+- Notes :
+The specified HTML element is appended to the layout element of the component after any configured
+HTML has been inserted, and so the document will not contain this element at the time the render event is fired.
+The specified HTML element used will not participate in any
layout
+scheme that the Component may use. It is just HTML. Layouts operate on child items
.
+Add either the x-hidden
or the x-hide-display
CSS class to
+prevent a brief flicker of the content before it is rendered to the panel.
+
Component ctCls : StringAn optional extra CSS class that will be added to this component's container. This can be useful for
adding customize...An optional extra CSS class that will be added to this component's container. This can be useful for
adding customized styles to the container or any of its children using standard CSS rules. See
Ext.layout.ContainerLayout.extraCls also.
@@ -139,7 +163,8 @@ which assigns a value by default:
To configure the above Class with an extra CSS class append to the default. For example,
for BoxLayout (Hbox and Vbox):ctCls: 'x-box-layout-ct custom-class'
- Component disabled : BooleanRender this component disabled (default is false). Component disabledClass : StringCSS class added to the component when it is disabled (defaults to 'x-item-disabled'). Component fieldLabel : StringThe label text to display next to this Component (defaults to '').
+ Component data : MixedThe initial set of data to apply to the tpl
to
+update the content area of the Component. Component disabled : BooleanRender this component disabled (default is false). Component disabledClass : StringCSS class added to the component when it is disabled (defaults to 'x-item-disabled'). Component fieldLabel : StringThe label text to display next to this Component (defaults to '').
Note: this config is only used when this Component...The label text to display next to this Component (defaults to '').
Note: this config is only used when this Component is rendered by a Container which
has been configured to use the FormLayout layout manager (e.g.
@@ -180,7 +205,11 @@ since items are automatically laid out when they are first shown (no sizing
is done while hidden).
Component hideParent : BooleanTrue to hide and show the component's container when hide/show is called on the component, false to hide
and show the...True to hide and show the component's container when hide/show is called on the component, false to hide
and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide
-button on a window by setting hide:true on the button when adding it to its parent container. Component id : StringThe unique id of this component (defaults to an auto-assigned id).
+button on a window by setting hide:true on the button when adding it to its parent container. Component html : String/ObjectAn HTML fragment, or a DomHelper specification to use as the layout element
+content (defaults to ''). The HTML conten...An HTML fragment, or a DomHelper specification to use as the layout element
+content (defaults to ''). The HTML content is added after the component is rendered,
+so the document will not contain this HTML at the time the render event is fired.
+This content is inserted into the body before any configured contentEl is appended. Component id : StringThe unique id of this component (defaults to an auto-assigned id).
You should assign an id if you need to be able to ...The unique id of this component (defaults to an auto-assigned id).
You should assign an id if you need to be able to access the component later and you do
not have an object reference available (e.g., using Ext.getCmp).
@@ -385,9 +414,9 @@ object. The ptype will be looked up at render time up to determine
type of Plugin to create.
If you create your own Plugins, you may register them using
Ext.ComponentMgr.registerPlugin in order to be able to
-take advantage of lazy instantiation and rendering. Component ref : StringA path specification, relative to the Component's ownerCt specifying into which
-ancestor Container to place a named r...A path specification, relative to the Component's ownerCt specifying into which
-ancestor Container to place a named reference to this Component.
+take advantage of lazy instantiation and rendering. Component ref : StringA path specification, relative to the Component's ownerCt
+specifying into which ancestor Container to place a named r...A path specification, relative to the Component's ownerCt
+specifying into which ancestor Container to place a named reference to this Component.
The ancestor axis can be traversed by using '/' characters in the path.
For example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar:
var myGrid = new Ext.grid.EditorGridPanel({
title: 'My EditorGridPanel',
@@ -406,9 +435,10 @@ For example, to put a reference to a Toolbar Button into the Panel which owns
}
}
});
-In the code above, if the ref had been 'saveButton'
the reference would
-have been placed into the Toolbar. Each '/' in the ref moves up one level from the
-Component's ownerCt.
Component region : String Component region : StringNote: this config is only used when this BoxComponent is rendered
by a Container which has been configured to use the...Note: this config is only used when this BoxComponent is rendered
by a Container which has been configured to use the BorderLayout
layout manager (e.g. specifying layout:'border').
@@ -498,7 +528,16 @@ Ext.Element.ap...A custom style specification to be appl
A string to be used as innerHTML...Note: this config is only used when this BoxComponent is a child item of a TabPanel.
A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over
the associated tab selector element. Ext.QuickTips.init()
-must be called in order for the tips to render. BoxComponent text : StringThe text to be used as innerHTML (html tags are accepted) Toolbar.TextItem width : NumberThe width of this component in pixels (defaults to auto).
+must be called in order for the tips to render. BoxComponent text : StringThe text to be used as innerHTML (html tags are accepted) Toolbar.TextItem tpl : MixedAn Ext.Template, Ext.XTemplate
+or an array of strings to form an Ext.XTemplate.
+Used in conjunction with the data and...An Ext.Template , Ext.XTemplate
+or an array of strings to form an Ext.XTemplate.
+Used in conjunction with the data
and
+tplWriteMode
configurations. Component tplWriteMode : StringThe Ext.(X)Template method to use when
+updating the content area of the Component. Defaults to 'overwrite'
+(see Ext.X...The Ext.(X)Template method to use when
+updating the content area of the Component. Defaults to 'overwrite'
+(see Ext.XTemplate.overwrite
). Component width : NumberThe width of this component in pixels (defaults to auto).
Note to express this dimension as a percentage or offset se...The width of this component in pixels (defaults to auto).
Note to express this dimension as a percentage or offset see Ext.Component.anchor. BoxComponent x : NumberThe local x (left) coordinate for this component if contained within a positioning container. BoxComponent xtype : StringThe registered xtype to create. This config option is not used when passing
a config object into a constructor. This ...The registered xtype to create. This config option is not used when passing
@@ -531,8 +570,10 @@ config for a suggestion, or use a render listener directly:new
See also getEl
Component hidden : BooleanTrue if this component is hidden. Read-only. Component initialConfig : ObjectThis Component's initial configuration specification. Read-only. Component ownerCt : Ext.ContainerThis Component's owner Container (defaults to undefined, and is set automatically when
this Component is added to a C... Component rendered : BooleanTrue if this component has been rendered. Read-only. Component
Public Methods
Method Defined By Toolbar.TextItem( String/Object text
)
- Creates a new TextItemCreates a new TextItemParameters:text
: String/ObjectA text string, or a config object containing a text property
Returns:- void
xtype: tbtext
Toolbar.TextItem addClass( string cls
)
+Note: to access items within the Container see itemId.
Component refOwner : Ext.ContainerThe ancestor Container into which the ref reference was inserted if this Component
+is a child of a Container, and has...The ancestor Container into which the ref reference was inserted if this Component
+is a child of a Container, and has been configured with a ref
. Component rendered : BooleanTrue if this component has been rendered. Read-only. Component
Public Methods
Method Defined By Toolbar.TextItem( String/Object text
)
+ Creates a new TextItemCreates a new TextItemParameters:text
: String/ObjectA text string, or a config object containing a text property
Returns:- void
Toolbar.TextItem addClass( string cls
)
:
Ext.ComponentAdds a CSS class to the component's underlying element.Adds a CSS class to the component's underlying element.Parameters:cls
: stringThe CSS class name to add
Returns:Ext.Component
this
Component addEvents( Object|String o
, string Optional.
)
:
@@ -604,7 +645,7 @@ should usually not need to be called directly.Disable this component and fire the 'disable' event.Disable this component and fire the 'disable' event.Parameters:- None.
Returns:Ext.Component
this
Component enable()
:
- Ext.ComponentEnable this component and fire the 'enable' event.Enable this component and fire the 'enable' event.Parameters:- None.
Returns:Ext.Component
this
Component enableBubble( Object events
)
+ Ext.ComponentEnable this component and fire the 'enable' event.Enable this component and fire the 'enable' event.Parameters:- None.
Returns:Ext.Component
this
Component enableBubble( String/Array events
)
:
voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present...Enables events fired by this Observable to bubble up an owner hierarchy by calling
@@ -613,13 +654,13 @@ this.getBubbleTarget() if present...
Enables events fi
implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
access the required target more quickly.
Example:
Ext.override(Ext.form.Field, {
-// Add functionality to Field's initComponent to enable the change event to bubble
- initComponent: Ext.form.Field.prototype.initComponent.createSequence(function() {
- this.enableBubble('change');
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
}),
-// We know that we want Field's events to bubble directly to the FormPanel.
- getBubbleTarget: function() {
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
if (!this.formPanel) {
this.formPanel = this.findParentByType('form');
}
@@ -634,11 +675,11 @@ access the required target more quickly.
}],
listeners: {
change: function() {
-// Title goes red if form has been modified.
- myForm.header.setStyle("color", "red");
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
}
}
-});
Parameters:events
: ObjectThe event name to bubble, or an Array of event names.
Returns:- void
Observable findParentBy( Function fn
)
+});Parameters:events
: String/ArrayThe event name to bubble, or an Array of event names.
Returns:- void
Observable findParentBy( Function fn
)
:
Ext.ContainerFind a container above this component at any level by a custom function. If the passed function returns
true, the con...Find a container above this component at any level by a custom function. If the passed function returns
@@ -691,7 +732,7 @@ id is returned using g... BoxComponent getResizeEl()
:
- voidReturns the outermost Element of this Component which defines the Components overall size.
+ Ext.ElementReturns the outermost Element of this Component which defines the Components overall size.
Usually this will return t...Returns the outermost Element of this Component which defines the Components overall size.
Usually this will return the same Element as getEl
,
but in some cases, a Component may have some more wrapping Elements around its main
@@ -699,7 +740,7 @@ active Element.
An example is a ComboBox. It is encased in a wrapping Element which
contains both the <input>
Element (which is what would be returned
by its getEl
method, and the trigger button Element.
-This Element is returned as the resizeEl
.
Parameters:- None.
Returns:- void
BoxComponent getSize()
+This Element is returned as the resizeEl
.Parameters:- None.
Returns:Ext.Element
The Element which is to be resized by size managing layouts.
BoxComponent getSize()
:
ObjectGets the current size of the component's underlying element.Gets the current size of the component's underlying element.Parameters:- None.
Returns:Object
An object containing the element's size {width: (element width), height: (element height)}
BoxComponent getWidth()
:
@@ -741,7 +782,26 @@ to participate in determination of inherited xtypes.
var isText = t.isXType('textfield'); // true
var isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent
var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instanceParameters:xtype
: StringThe xtype to check for this Componentshallow
: Boolean(optional) False to check whether this Component is descended from the xtype (this is
-the default), or true to check whether this Component is directly of the specified xtype.
Returns:Boolean
True if this component descends from the specified xtype, false otherwise.
Component nextSibling()
+the default), or true to check whether this Component is directly of the specified xtype.Returns:Boolean
True if this component descends from the specified xtype, false otherwise.
Component mon( Observable|Element item
, Object|String ename
, Function fn
, Object scope
, Object opt
)
+ :
+ voidAdds listeners to any Observable object (or Elements) which are automatically removed when this Component
+is destroye...Adds listeners to any Observable object (or Elements) which are automatically removed when this Component
+is destroyed. Usage:
+myGridPanel.mon(myGridPanel.getSelectionModel(), 'selectionchange', handleSelectionChange, null, {buffer: 50});
+
+or:
+myGridPanel.mon(myGridPanel.getSelectionModel(), {
+ selectionchange: handleSelectionChange,
+ buffer: 50
+});
+
Parameters:item
: Observable|ElementThe item to which to add a listener/listeners.ename
: Object|StringThe event name, or an object containing event name properties.fn
: FunctionOptional. If the ename
parameter was an event name, this
+is the handler function.scope
: ObjectOptional. If the ename
parameter was an event name, this
+is the scope (this
reference) in which the handler function is executed.opt
: ObjectOptional. If the ename
parameter was an event name, this
+is the addListener options.
Returns:- void
Component mun( Observable|Element item
, Object|String ename
, Function fn
, Object scope
)
+ :
+ voidRemoves listeners that were added by the mon method.Removes listeners that were added by the mon method.Parameters:item
: Observable|ElementThe item from which to remove a listener/listeners.ename
: Object|StringThe event name, or an object containing event name properties.fn
: FunctionOptional. If the ename
parameter was an event name, this
+is the handler function.scope
: ObjectOptional. If the ename
parameter was an event name, this
+is the scope (this
reference) in which the handler function is executed.
Returns:- void
Component nextSibling()
:
Ext.ComponentReturns the next component in the owning containerReturns the next component in the owning containerParameters:- None.
Returns:Ext.Component
Component on( String eventName
, Function handler
, [Object scope
], [Object options
] )
:
@@ -786,7 +846,9 @@ which this component will be inserted (defaults to appending to the end of the c
If events were suspended using the queueSuspended parameter, then all
event...Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
-events fired during event suspension will be sent to any listeners now.Parameters:- None.
Returns:- void
Observable setDisabled( Boolean disabled
)
+events fired during event suspension will be sent to any listeners now.Parameters:- None.
Returns:- void
Observable setAutoScroll( Boolean scroll
)
+ :
+ Ext.BoxComponentSets the overflow on the content element of the component.Sets the overflow on the content element of the component.Parameters:scroll
: BooleanTrue to allow the Component to auto scroll.
Returns:Ext.BoxComponent
this
BoxComponent setDisabled( Boolean disabled
)
:
Ext.ComponentConvenience function for setting disabled/enabled by boolean.Convenience function for setting disabled/enabled by boolean.Parameters:disabled
: Boolean
Returns:Ext.Component
this
Component setHeight( Number height
)
:
@@ -837,9 +899,16 @@ after the Force the component's size to recalculate based on the underlying element's current height and width.Force the component's size to recalculate based on the underlying element's current height and width.Parameters:- None.
Returns:Ext.BoxComponent
this
BoxComponent un( String eventName
, Function handler
, [Object scope
] )
:
- voidRemoves an event handler (shorthand for removeListener.)Removes an event handler (shorthand for removeListener.)Parameters:eventName
: StringThe type of event the handler was associated with.handler
: FunctionThe handler to remove. This must be a reference to the function passed into the addListener call.scope
: Object(optional) The scope originally specified for the handler.
Returns:- void
Observable updateBox( Object box
)
+ voidRemoves an event handler (shorthand for removeListener.)Removes an event handler (shorthand for removeListener.)Parameters:eventName
: StringThe type of event the handler was associated with.handler
: FunctionThe handler to remove. This must be a reference to the function passed into the addListener call.scope
: Object(optional) The scope originally specified for the handler.
Returns:- void
Observable update( Mixed htmlOrData
, [Boolean loadScripts
], [Function callback
] )
+ :
+ voidUpdate the content area of a component.Update the content area of a component.Parameters:htmlOrData
: MixedIf this component has been configured with a template via the tpl config
+then it will use this argument as data to populate the template.
+If this component was not configured with a template, the components
+content area will be updated via Ext.Element updateloadScripts
: Boolean(optional) Only legitimate when using the html configuration. Defaults to falsecallback
: Function(optional) Only legitimate when using the html configuration. Callback to execute when scripts have finished loading
Returns:- void
Component updateBox( Object box
)
:
- Ext.BoxComponentSets the current box measurements of the component's underlying element.Sets the current box measurements of the component's underlying element.Parameters:box
: ObjectAn object in the format {x, y, width, height}
Returns:Ext.BoxComponent
this
BoxComponent
Public Events
Event Defined By afterrender :
+ Ext.BoxComponentSets the current box measurements of the component's underlying element.Sets the current box measurements of the component's underlying element.Parameters:box
: ObjectAn object in the format {x, y, width, height}
Returns:Ext.BoxComponent
this
BoxComponent
Public Events
Event Defined By added :
+ ( Ext.Component this
, Ext.Container ownerCt
, number index
)
+ Fires when a component is added to an Ext.ContainerFires when a component is added to an Ext.ContainerListeners will be called with the following arguments:this
: Ext.ComponentownerCt
: Ext.ContainerContainer which holds the componentindex
: numberPosition at which the component was added
Component afterrender :
( Ext.Component this
)
Fires after the component rendering is finished.
The afterrender event is fired after this Component has been rendere...Fires after the component rendering is finished.
@@ -881,7 +950,9 @@ has a null implementation. Component move :
( Ext.Component this
, Number x
, Number y
)
- Fires after the component is moved.Fires after the component is moved.Listeners will be called with the following arguments:this
: Ext.Componentx
: NumberThe new x positiony
: NumberThe new y position
BoxComponent render :
+ Fires after the component is moved.Fires after the component is moved.Listeners will be called with the following arguments:this
: Ext.Componentx
: NumberThe new x positiony
: NumberThe new y position
BoxComponent removed :
+ ( Ext.Component this
, Ext.Container ownerCt
)
+ Fires when a component is removed from an Ext.ContainerFires when a component is removed from an Ext.ContainerListeners will be called with the following arguments:this
: Ext.ComponentownerCt
: Ext.ContainerContainer which holds the component
Component render :
( Ext.Component this
)
Fires after the component markup is rendered.Fires after the component markup is rendered.Listeners will be called with the following arguments:this
: Ext.Component
Component resize :
( Ext.Component this
, Number adjWidth
, Number adjHeight
, Number rawWidth
, Number rawHeight
)