View Full Version : vbox layout issue

5 Mar 2011, 6:08 PM
Hi all, I have a vbox with a carousel in the top half, and a dataview in the bottom half (in a tab panel, so there's actually three dataviews, one for each tab). I want the entire page to scroll to reveal the extra rows in the dataview - instead of having just the dataview in the bottom half scrolling. (this is for phone only)

The only I seem to accomplish this is by setting a fixed height on the dataview, otherwise scrolling the page up doesn't reveal anything past the already visible rows. Obviously I would want the height to be set dynamically according to how many rows are generated, I must be missing some simple thing ...

Code below show the carousel panel (top half), the tabs panel (bottom half), the first dataview as an example, and the home panel where all this lives.

Your help much appreciated


var carouselPanel = new Ext.Carousel({
items: [item1, item2, item3],
cls: 'carousel-wrapper',
flex: !Ext.is.Phone ? Ext.getOrientation() == "portrait" ? 1.5: 1: '',
height: 280 //this is actually in the css, here for illustration only

var tabsPanel = new Ext.TabPanel({
fullscreen: false,
sortable: true,
cls: 'tab-wrapper',
tabBar: tabBarM,
items: [tabHomepageLatest, tabHomepageViewed, tabHomepageChannels],
flex: !Ext.is.Phone ? 1 : '',

var tabHomepageLatest = new Ext.DataView({
id: 'tabHomepageLatest',
title: 'Latest',
store: storeTabLatest,
tpl: templates.tabbedViewTplPortrait,
scroll: false,
height: 1000, //this is actually in the css, here for illustration only
itemSelector: 'li.menu-item',
fullscreen: false,
listeners: {
itemTap: doSomething,

var homePanel = new Ext.Panel({
id: 'homePanel',
layout: 'card',
fullscreen: true,
items: [{
itemId: 'homeLayout',
fullscreen : true,
scroll: Ext.is.Phone ? 'vertical' : false,
layout: {
type: "vbox",
align: "stretch"
items: [carouselPanel, tabsPanel]
}],dockedItems: dockedItems

24 Jul 2012, 8:46 AM
Ping !
This is an interesting problem I am always facing when working with vbox and dataview. Any idea from the forum ?


24 Jul 2012, 8:53 AM
Did you try the layout auto instead of vbox ?