Clear Up
SharpKit Reference

Toolbar Class

Namespace: Ext

Base Types

System.Object

Constructors

Methods

Name Description
applyTitle(object)
hideTitle() Hides the title if it exists.
showTitle() Shows the title if it exists.
updateTitle(object, object)

Properties

Name Description
extend {@link Ext.Toolbar}s are most commonly used as docked items as within a {@link Ext.Container}. They can be docked either `top` or `bottom` using the {@link #docked} configuration. The {@link #defaultType} of {@link Ext.Toolbar} is {@link Ext.Button}. ## Examples @example miniphone preview Ext.create('Ext.Container', { fullscreen: true, layout: { type: 'vbox', pack: 'center' }, items: [ { xtype : 'toolbar', docked: 'top', title: 'My Toolbar' }, { xtype: 'container', layout: { type: 'vbox', pack: 'center' }, defaults: { xtype: 'button', margin: '10 10 0 10' }, items: [ { text: 'Toggle docked', handler: function() { var toolbar = Ext.ComponentQuery.query('toolbar')[0], newDocked = (toolbar.getDocked() == 'top') ? 'bottom' : 'top'; toolbar.setDocked(newDocked); } }, { text: 'Toggle UI', handler: function() { var toolbar = Ext.ComponentQuery.query('toolbar')[0], newUi = (toolbar.getUi() == 'light') ? 'dark' : 'light'; toolbar.setUi(newUi); } }, { text: 'Change title', handler: function() { var toolbar = Ext.ComponentQuery.query('toolbar')[0], titles = ['My Toolbar', 'Ext.Toolbar', 'Configurations are awesome!', 'Beautiful.'], //internally, the title configuration gets converted into a {@link Ext.Title} component, //so you must get the title configuration of that component title = toolbar.getTitle().getTitle(), newTitle = titles[titles.indexOf(title) + 1] || titles[0]; toolbar.setTitle(newTitle); } } ] } ] });
isToolbar
xtype {@link Ext.Toolbar}s are most commonly used as docked items as within a {@link Ext.Container}. They can be docked either `top` or `bottom` using the {@link #docked} configuration. The {@link #defaultType} of {@link Ext.Toolbar} is {@link Ext.Button}. ## Examples @example miniphone preview Ext.create('Ext.Container', { fullscreen: true, layout: { type: 'vbox', pack: 'center' }, items: [ { xtype : 'toolbar', docked: 'top', title: 'My Toolbar' }, { xtype: 'container', layout: { type: 'vbox', pack: 'center' }, defaults: { xtype: 'button', margin: '10 10 0 10' }, items: [ { text: 'Toggle docked', handler: function() { var toolbar = Ext.ComponentQuery.query('toolbar')[0], newDocked = (toolbar.getDocked() == 'top') ? 'bottom' : 'top'; toolbar.setDocked(newDocked); } }, { text: 'Toggle UI', handler: function() { var toolbar = Ext.ComponentQuery.query('toolbar')[0], newUi = (toolbar.getUi() == 'light') ? 'dark' : 'light'; toolbar.setUi(newUi); } }, { text: 'Change title', handler: function() { var toolbar = Ext.ComponentQuery.query('toolbar')[0], titles = ['My Toolbar', 'Ext.Toolbar', 'Configurations are awesome!', 'Beautiful.'], //internally, the title configuration gets converted into a {@link Ext.Title} component, //so you must get the title configuration of that component title = toolbar.getTitle().getTitle(), newTitle = titles[titles.indexOf(title) + 1] || titles[0]; toolbar.setTitle(newTitle); } } ] } ] });
© Copyright 2005-2011 SharpKit. All rights reserved.