PDA

View Full Version : [CLOSED][PR4] tbspacer is doing nothing



Steffen Hiller
16 Mar 2011, 7:25 PM
xtype: 'tbspacer' doesn't show any effect



items: [{
xtype: 'tbspacer'
}, {
xtype: 'button',
text: 'Save'
}, {
xtype: 'button',
text: 'Cancel'
}]


Buttons stay left aligned.

evant
16 Mar 2011, 10:48 PM
You want tbfill:



Ext.onReady(function(){

Ext.create('Ext.panel.Panel', {
width: 200,
height: 200,
renderTo: document.body,
dockedItems: [{
xtype: 'toolbar',
items: [{
xtype: 'tbfill'
}, {
text: 'Foo'
}]
}]
});
});

Steffen Hiller
17 Mar 2011, 5:38 AM
Great, works!

There's still tbspacer used in the examples here and there, e.g. in FeedWindow.js:



dockedItems: [{
dock: 'bottom',
xtype: 'toolbar',
ui: 'footer',
items: [{
xtype: 'tbspacer'
}, {
xtype: 'button',
text: 'Add feed',
scope: this,
handler: this.onAddClick
}, {
xtype: 'button',
text: 'Cancel',
scope: this,
handler: this.destroy
}]
}]

evant
17 Mar 2011, 5:42 AM
Yeah, that's intentional. It just adds a little bit of space.

Steffen Hiller
17 Mar 2011, 5:56 AM
Oh, I actually checked the CSS and saw it was doing nothing. But now I see that it adds a 2px space. :) Cool.