PDA

View Full Version : Spacer(tbspacer) question



frb
5 Feb 2012, 1:00 AM
Sencha Designer 2 don't allow to add tbspacer to not toolbar containers, so this example from HBox Layout couldn't reproduced:


text: 'Spaced',
handler: function(){
replace({
layout: {
type: 'hbox',
padding:'5',
align:'top'
},
defaults:{margins:'0 5 0 0'},
items:[{
xtype:'button',
text: 'Small Size'
},{
xtype:'tbspacer',
flex:1
},{
xtype:'button',
scale: 'medium',
text: 'Medium Size'
},{
xtype:'tbspacer',
flex:1
},{
xtype:'button',
scale: 'large',
text: 'Large Size',
margins:'0'
}]
}, 'spaced');


how to add flex spaces between components in hbox layout?

aconran
6 Feb 2012, 12:37 PM
tbspacer - toolbar spacer

Add a component and set the flex to 1.

frb
6 Feb 2012, 11:55 PM
thanks