PDA

View Full Version : Layout Question: 2 Sections in VBox, Make One Fill Available Space



don_bm
13 Sep 2010, 11:48 AM
I'm having a difficult time getting this to work. I have a layout w/ the top most Panel using an hbox w/ left and main items. The left section uses a VBox with 2 items: content and a video. I want the content section to take the remaining space and I can't seem to get it to work w/ 0.94. It worked fine on 0.93. Here's my code:



var content = new Ext.Panel({
layout: {
type: 'fit',
align: 'stretch',
flex: 2
},
style: 'border: 5px solid #666666',
html: 'Content'
});
var video = new Ext.Panel({
layout: 'fit',
style: 'border: 5px solid #666666',
width: 320,
height: 240,
html: 'Video'
});
var left = new Ext.Panel({
layout: {
type: 'vbox',
align: 'stretch',
pack: 'end'
},
width: 320,
items: [content, video]
});
var center = new Ext.Panel({
layout: 'fit',
flex: 2,
style: 'border: 5px solid #666666',
html: 'Center'
});

Ext.setup({
onReady: function() {
var homeScreen = new Ext.Panel({
layout: {
type: 'hbox',
align: 'stretch',
pack: 'start'
},
fullscreen: true,
items: [left, center]
});
}
});
I'm just getting started w/ Sencha Touch and I do not have any experience with Ext JS so please let me know if I'm doing anything wrong. Thanks!

evant
13 Sep 2010, 5:37 PM
Aside from some redundant layout stuff, looks like a bug.

don_bm
14 Sep 2010, 10:27 AM
Okay, thanks. I was going cross-eyed trying to figure out what was wrong. Any idea what version this will get fixed in? I updated to 0.94 to use the refactored NestedList, which is all coded now. I'd rather not revert the new coding just to change it back again to work with 0.94+

don_bm
14 Sep 2010, 10:31 AM
Okay, thanks. I was going cross-eyed trying to figure out what was wrong. Any idea what version this will get fixed in? I updated to 0.94 to use the refactored NestedList, which is all coded now. I'd rather not revert the new coding just to change it back again to work with 0.94+

Please ignore, will post to the bug forum