-
15 Apr 2012 6:49 PM #1
4.1 RC3 DataView Width is invalid
4.1 RC3 DataView Width is invalid
hi,I changed the desktop DataView Tpl and set the width is 600.it works in 4.1RC1,but it doesn't work in 4.1RC2 and RC3.in RC2 and RC3 the width is 100%,help me.
-
15 Apr 2012 7:30 PM #2
I think you'll have to wrap the DataView in an extra level of container. Give the container a vbox layout and the DataView a flex of 1 and a width of 600 and it should look the way you want.
Seems a bit odd to give the wallpaper and the DataView different sizes though.
-
15 Apr 2012 10:04 PM #3
Because I need to group,so I horizontally it,any ideas?
-
15 Apr 2012 10:23 PM #4
The Container's width is 100%..PHP Code:createDataView: function () {
var me = this;
return {
xtype: 'container',
width: 600,
bodyBorder:false,
style: { position: 'absolute'}
x: 0, y: 0,
items: [{
xtype: 'dataview',
flex: 1,
overItemCls: 'x-view-over',
trackOver: true,
loadMask: false,
itemSelector: me.shortcutItemSelector,
store: me.shortcuts,
tpl: new Ext.XTemplate(me.shortcutTpl)
}]
};
}
-
16 Apr 2012 6:20 AM #5
You're missing the vbox layout on the container. The width needs to go on the DataView, not the container. You can't really avoid the container being stretched to 100% because it's in a fit layout but it should be largely irrelevant if the DataView itself is only 600 wide as the rest of the container will just be space.


Reply With Quote
