javascript - Adding tabs to an existing toolbar in ExtJS -
I have an existing toolbar and adding tabs to it will flip between the two panels using the card layout. What is my best option and is there any example of doing this?
- Is it possible to add a tab to my existing toolbar? Changing xtype on my existing buttons did not meet me with the tabs I was hoping to see.
- Create a tab panel, in which I will have two cards, each tab will be mapped to its panel. With this option, can I add additional buttons and menus to the tab panel?
Here is a sample of my existing toolbar code, there is just one xtype of the message_button and attachments_button tab and then somehow the simulation tab functionality?
Ext.define ('MyArchive.Toolbar', {alias: 'myarchive.toolbar', extension: 'Ext.toolbar.Toolbar', Doc: 'Top', Width: '100% Item: [Beautiful straight forward buttons with a listener, some fancy messages are not, buttons, attachments_buttons, '- & gt;', {xtype: 'button', id: 'forward-button', text: ' Next '},' - ', {xtype:' button ', id:' recover-button ', text:' retrieve '},' - ', {text:' download ', menu: {xtype:' menu ' , Id: 'download-menu', items: [{xtype: 'menuitem', id: 'download-original', text: 'original', iconCls: 'download-icon'}, {xtype: 'menuitem', id : Download-PDF ', Text:' PDF, IconCL: 'PDF-Icon']}}}]
Is it possible to add tabs to it? My current toolbar? Changing xtype on the existing button did not provide me with the tabs I wanted to see.
I have tried to do this but there is no luck.
Create a tab panel in which I will have two cards, each tab will be mapped to its panel with this option, Or I can add extra buttons and menus I tab panel?
This is possible. But the result looks ugly (you can decorate it with CSS). Use
tabpanel.tabBar.add () to add buttons and menus :)
Tabfunal Tabbar.add ({xtype: 'button', text: 'hello, I' ma button '}); Tabpanel.tabBar.add ({xtype: 'splitbutton', text: 'download', menu: {xtype: 'menu', id: 'download-menu', // ans so on ...
Comments
Post a Comment