-
22 Aug 2012 8:26 PM #1
Answered: Three-column Carousel (or List?)
Answered: Three-column Carousel (or List?)
I want to make 3-column vertical carousel (or list?). For example, https://dl.dropbox.com/u/3480160/carousel.png
Is it possible?
-
Best Answer Posted by sword-it
Hi,
You can use this :
Output:Code:Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', defaults: { flex: 1 }, items: [ { xtype:'carousel' , items:[ { html : 'carousel1', cls : 'card', style: 'background-color: red' } ] }, { xtype:'carousel' , items:[ { html : 'carousel2', cls : 'card', style: 'background-color: yellow' } ] }, { xtype:'carousel' , items:[ { html : 'carousel3', cls : 'card', style: 'background-color: green' } ] } ] });
Attachment 38189
-
22 Aug 2012 10:53 PM #2Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 76
- Answers
- 124
Hi,
You can use following code :
Output:Code:Ext.create('Ext.Carousel', { fullscreen: true, layout:{ type:'hbox' }, defaults: { styleHtmlContent: true }, items: [ { style: 'background-color: #759E60' , layout:'hbox' , items:[ { xtype:'panel', width:130, style: 'background-color: red' }, { xtype:'panel', width:130, style: 'background-color: yellow; margin-left:10px' }, { xtype:'panel', width:130, style: 'background-color: green; margin-left:10px' } ] }, { html : 'Item 2', style: 'background-color: #5E99CC' } ] });
carosoul.pngsword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
22 Aug 2012 11:06 PM #3
No, you have carousel with two pages. One page contains 3 panels.
On my screenshot 3 vertical carousels
-
22 Aug 2012 11:19 PM #4Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 76
- Answers
- 124
Hi,
You can use this :
Output:Code:Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', defaults: { flex: 1 }, items: [ { xtype:'carousel' , items:[ { html : 'carousel1', cls : 'card', style: 'background-color: red' } ] }, { xtype:'carousel' , items:[ { html : 'carousel2', cls : 'card', style: 'background-color: yellow' } ] }, { xtype:'carousel' , items:[ { html : 'carousel3', cls : 'card', style: 'background-color: green' } ] } ] });
ccc.pngsword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
22 Aug 2012 11:36 PM #5
-
23 Aug 2012 12:23 AM #6
One more question:
I want to replace one panel from carousel to list. List is prepared, but to show I must run "List.show()", how can I place list into panel? I can't find anything in documentation
-
23 Aug 2012 12:39 AM #7Sencha - Community Support Team
- Join Date
- May 2012
- Location
- Istanbul
- Posts
- 1,331
- Vote Rating
- 76
- Answers
- 124
Hi,
You can use following code:
Output:cc.pngCode:Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', defaults: { flex: 1 }, items: [ { xtype:'carousel' , items:[ { html : 'carousel1', cls : 'card', style: 'background-color: red' } ] }, { xtype:'carousel' , items:[ { html : 'carousel2', cls : 'card', style: 'background-color: yellow' } ] }, { xtype:'list', widht:100, title:'list', itemTpl: '{title}', data: [ { title: 'Item 1' }, { title: 'Item 2' }, { title: 'Item 3' }, { title: 'Item 4' } ] } ] });sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
-
23 Aug 2012 12:45 AM #8
Thanks for reply. But I need to prepare list. For example,
Code:Ext.regModel('Records', { fields: ['Caption', 'imgURL'] }); var DataStore = new Ext.data.JsonStore({ model: 'Records', sorters: 'Caption', getGroupString: function(record) { return record.get('Caption')[0]; }, data: [ {Caption: 'First', imgURL: 'Image.png'}, {Caption: 'Second', imgURL: 'Image.png'}, {Caption: 'Third', imgURL: 'Image.png'}, {Caption: 'Fourth', imgURL: 'Image.png'}, ] }); var List = new Ext.List({ fullscreen: false, itemTpl: '<img src="{imgURL}" width="150" height="300" />', store: DataStore });
-
23 Aug 2012 1:30 AM #9
Oh, I solved it
Code:{ xtype: 'list', flex: 1, store: DataStore, itemTpl: '<img src="{imgURL}" width="150" height="300" />' }


Reply With Quote