user45245
user45245

Reputation: 905

How to make menu and toolbar in extjs?

I'm new in Extjs. I would like to know. Which components I can use, to make a menu and toolbar like in desktop app? I mean something like this.enter image description here

I wrote this code, but the result is not similar to desktop app menu.

Ext.define('untitled.view.main.Main', {
extend: 'Ext.panel.Panel',
xtype: 'app-main',

width: 200,
height: 150,
tbar: [{
    xtype: 'button',
    text: 'Select',
    menu:   Ext.create('Ext.menu.Menu', {
        items: [{
            text: 'JavaScript',
            handler: function () {
                alert('Selected JavaScript');
            }
        }, {
            text: 'Java',
        }, {
            text: 'C/C++'
        }]
    })
}]

});

New -------

enter image description here

Thank you very much, and the last question. How can I remove this arrow?

Upvotes: 1

Views: 637

Answers (1)

Sergey Novikov
Sergey Novikov

Reputation: 4196

Here is fiddle for you - desktop-like toolbar (use your iconCls for Icon buttons).

Ask if you need something updated.

Upvotes: 1

Related Questions