lansea
21 Jul 2010, 8:08 AM
I use the follow code set a horizontal scroll list
this.list = new Ext.List({
scroll: 'horizontal',
//minWidth: 9000,
layout: {
type: 'hbox'
padding: '5',
align: 'left'
}
});
this.main = new Ext.Panel({
scroll: 'horizontal'
layout:'fit',
defaults: {
scroll: 'horizontal'
},
items: this.list
});
this.items = [this.main];
when I load data to the list, the list can horizontal scroll, but only see first three data, the other data is cut. I debug the html, found that is because the width and min-width CSS properties is too small to display the data, so I set the list minWidth: to 9000, It can display all data,but that mean before I load data, I must calculate the data display length? Or there other good method to scroll list horizontal?
this.list = new Ext.List({
scroll: 'horizontal',
//minWidth: 9000,
layout: {
type: 'hbox'
padding: '5',
align: 'left'
}
});
this.main = new Ext.Panel({
scroll: 'horizontal'
layout:'fit',
defaults: {
scroll: 'horizontal'
},
items: this.list
});
this.items = [this.main];
when I load data to the list, the list can horizontal scroll, but only see first three data, the other data is cut. I debug the html, found that is because the width and min-width CSS properties is too small to display the data, so I set the list minWidth: to 9000, It can display all data,but that mean before I load data, I must calculate the data display length? Or there other good method to scroll list horizontal?