PDA

View Full Version : How to use the card layout?



Dumas
12 Jul 2010, 5:17 PM
Hi!

I'm not quite sure how to use the card alyout, I have a Panel with:

items: [
navi,
{
//layout: 'card',
//activeItem: 0,
height: '100px',
bodyStyle: 'padding:15px',
items: [{
xtype: 'panel',
items: [
/* ... some content ... */
] // eo items
}] // eo items
}
] // eo itemsAs soon as I uncomment the two configurations above I only see an borde rof the element anymore, even forcing an height doesn't change this. Did I forgot anything to do?

thx
Dumas

Condor
12 Jul 2010, 11:14 PM
activeItem is a config option of the layout (see layoutConfig).

Dumas
13 Jul 2010, 8:22 AM
The API Docs say different, in the CardLayout description stands:

var card = new Ext.Panel({
title: 'Example Wizard',
layout:'card',
activeItem: 0, // make sure the active item is set on the container config!
....


regards
Dumas

Condor
14 Jul 2010, 1:13 AM
Sorry, you're correct.

Other remarks:
1. height:'100px' (string) is invalid. It should be height:100 (number).
2. The inner panel doesn't have a layout. Do you really want 'auto' layout?

Dumas
23 Jul 2010, 6:19 AM
thx