Caspar
19 Jan 2012, 8:43 AM
Hello everyone,
i've got a problem combining 2 toolbars (top and bottom of the screen) with a carousel in the middle. Preferable the carousel would automaticly take the hole space inbetween, maybe someone could point me to a way to solve it?
Ext.setup(
{
tabletStartupScreen: '/images/tablet_startup.png',
phoneStartupScreen: '/images/phone_startup.png',
icon: '/images/icon.png',
icon_carousel: '/images/icon_carousel.png',
glossOnIcon: false,
onReady: function()
{
var tapHandler = function(button, event)
{
var txt = "User tapped the '" + button.text + "' button.";
Ext.getCmp('toolbartxt').update(txt);
};
new Ext.Panel(
{
fullscreen: true,
items: [
{
xtype: 'toolbar',
layout:
{
pack: 'center'
},
dock: 'top',
items: [
{
xtype: 'segmentedbutton',
items: [
{
text: 'Leicht',
handler: tapHandler
},
{
text: 'Normal',
pressed : true,
handler: tapHandler
},
{
text: 'Schwer',
handler: tapHandler
}]
}]
},
{
xtype: 'carousel',
layout: 'fit',
height: 250,
items: [
{
title: 'Bild 1',
html: 'a<br>a'
},
{
title: 'Bild 2',
html: 'b<br>b'
}]
},
{
xtype: 'toolbar',
dock: 'bottom',
ui: 'light',
layout:
{
pack: 'center',
},
items: [
{
text: 'Puzzlen!',
ui: 'action',
handler: tapHandler
}]
}]
});
}
});
The moment i delete the "height" from the carousel it stops showing at all and the bottom bar is directly below the topbar/carousel and should be at the very bottom of the screen - "dock: 'bottom'" isn't working like it does in the toolbar only excample page.
Thank you for your help!
PS: the taphandler is just from the excample page, ignore it please it will get changed after i get the layout right.
i've got a problem combining 2 toolbars (top and bottom of the screen) with a carousel in the middle. Preferable the carousel would automaticly take the hole space inbetween, maybe someone could point me to a way to solve it?
Ext.setup(
{
tabletStartupScreen: '/images/tablet_startup.png',
phoneStartupScreen: '/images/phone_startup.png',
icon: '/images/icon.png',
icon_carousel: '/images/icon_carousel.png',
glossOnIcon: false,
onReady: function()
{
var tapHandler = function(button, event)
{
var txt = "User tapped the '" + button.text + "' button.";
Ext.getCmp('toolbartxt').update(txt);
};
new Ext.Panel(
{
fullscreen: true,
items: [
{
xtype: 'toolbar',
layout:
{
pack: 'center'
},
dock: 'top',
items: [
{
xtype: 'segmentedbutton',
items: [
{
text: 'Leicht',
handler: tapHandler
},
{
text: 'Normal',
pressed : true,
handler: tapHandler
},
{
text: 'Schwer',
handler: tapHandler
}]
}]
},
{
xtype: 'carousel',
layout: 'fit',
height: 250,
items: [
{
title: 'Bild 1',
html: 'a<br>a'
},
{
title: 'Bild 2',
html: 'b<br>b'
}]
},
{
xtype: 'toolbar',
dock: 'bottom',
ui: 'light',
layout:
{
pack: 'center',
},
items: [
{
text: 'Puzzlen!',
ui: 'action',
handler: tapHandler
}]
}]
});
}
});
The moment i delete the "height" from the carousel it stops showing at all and the bottom bar is directly below the topbar/carousel and should be at the very bottom of the screen - "dock: 'bottom'" isn't working like it does in the toolbar only excample page.
Thank you for your help!
PS: the taphandler is just from the excample page, ignore it please it will get changed after i get the layout right.