I've tried to figure out how to center a table inside a card layout, but no luck.
The closest I got was in buildItems, to add a container, make it a vbox layout and put the table inside of it.. gotta be an easier, cleaner way.
The closest I got was in buildItems, to add a container, make it a vbox layout and put the table inside of it.. gotta be an easier, cleaner way.
Code:
Ext.define('ProductionOnly.view.Viewport', { extend: 'Ext.container.Viewport', requires: ['ProductionOnly.view.ProdGrid002', 'ProductionOnly.view.ProdGrid008', 'ProductionOnly.view.ProdGrid009'], initComponent: function() { var me = this; Ext.apply(me, { layout: 'card', items: me.buildItems() }); me.callParent(arguments); }, buildItems: function() { return [{ layout: { type: 'table', columns: 3 }, defaults: { width: '310', frame: true }, items: [{ xtype: 'prodgrid002', title: 'BRISTOL PRODUCTION', margin: 10 }, { xtype: 'prodgrid008', title: 'GRACEVILLE PRODUCTION', margin: 10 }, { xtype: 'prodgrid009', title: 'BROOKHAVEN PRODUCTION', margin: 10 }] }]; } });
Comment