1 Attachment(s)
How do you create one panel with multiple lists?
I want to create one panel with multiple different lists. I've seen some stuff on the forums about creating two lists that scroll independently of one another, but that's not exactly what I'm looking for. I want them to scroll as one uber list, but with totally different types of content and styles. Here's an example of kind of what I'm going for.
Attachment 29705
Here is the code I have so far.
Code:
MixtapeMachine.levelOne = createMixtapePage({
id: 'levelOne',
fullscreen: true,
items: [
createMixtapeList({
id: 'levelonelist',
store: MixtapeMachine.levelOneStore,
onSelect: function(list, index){
Ext.dispatch({
controller: MixtapeMachine.controllers.MainController,
action: 'onLevelOneSelect',
list: list,
index: index
});
},
plugins: [MixtapeMachine.noload_footer_plugin]
})],
dockedItems: [{
xtype: 'toolbar',
title: 'Mixtape Machine',
}],
});
I've been trying to add another list to the items array, but I just can't seem to get it. :(( Can anybody help? createMixtapeList() uses the factory method to return list item, in case your wondering.
Well now I have two lists, but not the right scroll...
Thanks so much for your help. Now I have two lists in my panel. But both lists scroll independently and clip. :( When I change the flex, it alters the height of one list or the other, but they still scroll independently(Only one scroll's at a time). Is there any way I can get them to scroll as one list?
Code:
MixtapeMachine.levelOne = createMixtapePage({
id: 'levelOne',
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [createMixtapeList({
id: 'leveltwolist',
flex: 5,
store: MixtapeMachine.LevelTwo_Mixtapes,
onSelect: function(list, index){
Ext.dispatch({
controller: MixtapeMachine.controllers.MainController,
action: 'onLevelTwoSelect',
list: list,
index: index
});
},
plugins: [MixtapeMachine.noload_footer_plugin]
}),
createMixtapeList({
id: 'levelonelist',
flex: 3,
store: MixtapeMachine.levelOneStore,
onSelect: function(list, index){
Ext.dispatch({
controller: MixtapeMachine.controllers.MainController,
action: 'onLevelOneSelect',
list: list,
index: index
});
},
plugins: [MixtapeMachine.noload_footer_plugin]
})],
dockedItems: [{
xtype: 'toolbar',
title: 'Mixtape Machine',
}],
});
Thanks for your help!!!