ssdesign
20 Oct 2010, 6:23 PM
Hi,
I am trying to make a UI using Card Layout.
In one of the cards, I need to nest a carousel.
This is how I am trying to do it:
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: true,
onReady: function() {
createSplash();
}
});
function createSplash(){
this.imgCarousel = new Ext.Carousel({
defaults: {
cls: 'midlayer'
},
items: [{
html: 'Some image'
},
{
title: 'Tab 2',
html: '2nd Image'
},
{
title: 'Tab 3',
html: '3rd Image'
}]
});
p = new Ext.Panel({
fullscreen: true,
layout: 'card',
items: [
{
itemId: 'mainScreen',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
{
flex: 1,
cls: 'toplayer'
},
{
//flex: 3,
cls: 'midlayer',
layout:{
type: 'hbox',
align: 'stretch'
},
items:[imgCarousel]
},
{
flex: 2,
cls: 'toplayer'
}
]
},
imgCarousel
]
});
p.setCard(0);
}
I want the Carousel in the middle of the first card.
I dont get any errors, but Carousel is not visible.
I am trying to make a UI using Card Layout.
In one of the cards, I need to nest a carousel.
This is how I am trying to do it:
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: true,
onReady: function() {
createSplash();
}
});
function createSplash(){
this.imgCarousel = new Ext.Carousel({
defaults: {
cls: 'midlayer'
},
items: [{
html: 'Some image'
},
{
title: 'Tab 2',
html: '2nd Image'
},
{
title: 'Tab 3',
html: '3rd Image'
}]
});
p = new Ext.Panel({
fullscreen: true,
layout: 'card',
items: [
{
itemId: 'mainScreen',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
{
flex: 1,
cls: 'toplayer'
},
{
//flex: 3,
cls: 'midlayer',
layout:{
type: 'hbox',
align: 'stretch'
},
items:[imgCarousel]
},
{
flex: 2,
cls: 'toplayer'
}
]
},
imgCarousel
]
});
p.setCard(0);
}
I want the Carousel in the middle of the first card.
I dont get any errors, but Carousel is not visible.