r_honey
27 Nov 2011, 1:27 PM
{
xtype: 'toolbar',
docked: 'bottom',
scrollable: { direction: 'horizontal', indicators: false },
layout: {
type: 'hbox',
align: 'middle',
pack: 'left'
},
items: [
{
xtype: 'segmentedbutton',
items: [
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
//More buttons to ensure they overflow the available width and need scrolling
]
}
]
}
If you tap and scroll the toolbar and then "untap", the toolbar loses its scroll position (basically you cannot get the overflowed button into view by scrolling so they can be tapped).
xtype: 'toolbar',
docked: 'bottom',
scrollable: { direction: 'horizontal', indicators: false },
layout: {
type: 'hbox',
align: 'middle',
pack: 'left'
},
items: [
{
xtype: 'segmentedbutton',
items: [
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
{
xtype: 'button',
iconAlign: 'top',
iconCls: 'home',
iconMask: true,
text: 'Home',
},
//More buttons to ensure they overflow the available width and need scrolling
]
}
]
}
If you tap and scroll the toolbar and then "untap", the toolbar loses its scroll position (basically you cannot get the overflowed button into view by scrolling so they can be tapped).