]>
git.proxmox.com Git - extjs.git/blob - extjs/build/examples/kitchensink/classic/samples/view/button/RightTextButtons.js
2 * This example shows how to align button text to the right. By default, buttons are sized
3 * to the width of the text inside them, but this behavior can be overridden by giving the
4 * button a fixed width. In such a case the alignment of the text can be controlled using
5 * the `textAlign` config.
7 Ext
.define('KitchenSink.view.button.RightTextButtons', {
8 extend
: 'Ext.Container',
9 xtype
: 'right-text-buttons',
12 initComponent: function() {
20 change
: this.toggleDisabled
,
28 tdAttrs
: { style
: 'padding: 5px 10px;' }
53 iconCls
: 'button-home-small',
57 iconCls
: 'button-home-medium',
61 iconCls
: 'button-home-large',
65 html
: 'Icon and Text (left)'
68 iconCls
: 'button-home-small',
72 iconCls
: 'button-home-medium',
77 iconCls
: 'button-home-large',
82 html
: 'Icon and Text (top)'
85 iconCls
: 'button-home-small',
90 iconCls
: 'button-home-medium',
96 iconCls
: 'button-home-large',
102 html
: 'Icon and Text (right)'
105 iconCls
: 'button-home-small',
110 iconCls
: 'button-home-medium',
116 iconCls
: 'button-home-large',
122 html
: 'Icon and Text (bottom)'
125 iconCls
: 'button-home-small',
130 iconCls
: 'button-home-medium',
136 iconCls
: 'button-home-large',
146 toggleDisabled: function(checkbox
, newValue
, oldValue
) {
147 var toggleFn
= newValue
? 'disable' : 'enable';
149 Ext
.each(this.query('button'), function(item
) {