-
4 Jul 2012 3:45 AM #1
Answered: Can't show Ext.list in overlay panel.
Answered: Can't show Ext.list in overlay panel.
Hi everyone.
I try to when you click on the icon button buttonIcon.png displayed pop up menu with Ext.list popUpMenu.png, instead I get a blank pop-up menu, without Ext.List blankPopUpMenu.png.
Function onMyButtonTap:
Please help me solve this problem.Code:var test = Ext.create('Ext.List', { fullscreen: true, itemTpl: '{title}', data: [ { title: 'Item 1' }, { title: 'Item 2' }, { title: 'Item 3' }, { title: 'Item 4' } ] }); if (!this.overlay) { this.overlay = Ext.Viewport.add({ xtype: 'panel', modal: true, hideOnMaskTap: true, showAnimation: { type: 'popIn', duraton: 250, easing: 'ease-out' }, hideAnimation: { type: 'popOut', duraton: 250, easing: 'ease-out' }, centered: true, width: Ext.os.deviceType == 'Phone' ? 260 : 400, height: Ext.os.deviceType == 'Phone' ? 220 : 400, items: [test], scrollable: true }); } this.overlay.show();
P.S. Sorry for my English.
-
Best Answer Posted by iSmartDevice
Add the layout property in the panel's config and set it to 'fit'. Below is an example working on my computer.
Code:var button = Ext.create('Ext.Button', { text: 'Button', id: 'rightButton' }); Ext.create('Ext.Container', { fullscreen: true, items: [ { docked: 'top', xtype: 'titlebar', items: [ button ] } ] }); var test = Ext.create('Ext.List', { fullscreen: true, itemTpl: '{title}', data: [ { title: 'Item 1' }, { title: 'Item 2' }, { title: 'Item 3' }, { title: 'Item 4' } ] }); Ext.create('Ext.Panel', { items: [ test ], left: 0, padding: 10, width: 300, height:100, layout:'fit', }).showBy(button);
-
4 Jul 2012 9:50 AM #2
Add the layout property in the panel's config and set it to 'fit'. Below is an example working on my computer.
Code:var button = Ext.create('Ext.Button', { text: 'Button', id: 'rightButton' }); Ext.create('Ext.Container', { fullscreen: true, items: [ { docked: 'top', xtype: 'titlebar', items: [ button ] } ] }); var test = Ext.create('Ext.List', { fullscreen: true, itemTpl: '{title}', data: [ { title: 'Item 1' }, { title: 'Item 2' }, { title: 'Item 3' }, { title: 'Item 4' } ] }); Ext.create('Ext.Panel', { items: [ test ], left: 0, padding: 10, width: 300, height:100, layout:'fit', }).showBy(button);
-
4 Jul 2012 1:30 PM #3
Thank you very much.



Reply With Quote