View Full Version : Horizontal Menu in ExtJS 4

31 Jan 2012, 3:13 AM
How can I create an Horizontal Menu like below in ExtJS 4 ?

dev.sencha.com/playpen/ext-core-latest/examples/menu (http://dev.sencha.com/playpen/ext-core-latest/examples/menu/)

31 Jan 2012, 9:37 AM
Use a button with menus and then style it all the way you want.

31 Jan 2012, 12:30 PM
Here's a trivial example to get you started:

Ext.create('Ext.window.Window', {
height: 250,
width: 350,
title: 'Menu Test',
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
items: [{
xtype: 'splitbutton',
text: 'File',
menu: {
items: [{
text: 'New...'
text: 'Open...'
xtype: 'splitbutton',
text: 'Edit',
menu: {
items: [{
text: 'Copy'
text: 'Paste'

28 Mar 2013, 4:57 AM
When I make a horizontal menu with split buttons, I am not able to right-click-open-in-a-new-window.

Something I do from the main menu at our site all day long.

So in my case the first answer is better:

But I am confused about where it came from.
Is it very old or very new?

Maybe the geniuses know how to style split buttons so that they support the browser right-click menu (recognized as a link that can be opened in a new window or tab)?

Which is the path of the future here?

The example uses Ext.extend, so it is old.
The trick I needed was to use html:'<a href...>' instead of text.