View Full Version : Reusing a menu button on different screens
What is the best way to reuse a menu button on different screen's toolbars without duplicating it?
Thanks,
Joud
petr.vecera
6 Nov 2017, 5:15 AM
Using linking aka use xtypes
Do drag and drop , create a link http://prntscr.com/h6vspu and http://prntscr.com/h6vsui
Or you mean something different?
Using linking aka use xtypes
Do drag and drop , create a link http://prntscr.com/h6vspu and http://prntscr.com/h6vsui
Or you mean something different?
I already tried drag and drop but the menu button is moved to the other panel, the message "copy, move, link" doesn't appear :/
petr.vecera
6 Nov 2017, 11:02 AM
Which class is your menu button ? Can you share screenshot or copy the code ?
Here's the code:
xtype: 'toolbar',
docked: 'top',
layout: {
type: 'hbox',
pack: 'center'
},
items: [
{
xtype: 'button',
ui: 'action',
docked: 'left',
menu: {
xtype: 'menu',
minWidth: '150px',
items: [
{
xtype: 'menuitem',
text: 'New'
},
{
xtype: 'menuitem',
text: 'Open'
},
{
xtype: 'menuitem',
text: 'Edit'
},
{
xtype: 'menuitem',
text: 'Save'
}
]
}
}
]
wayne.rudd
7 Nov 2017, 1:04 PM
You can right click on menu button and 'Promote to class' - that will give you a linkable class
Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.