Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS Button Style Toolbar [duplicate]

I was wondering if it is possible to put a button into a panel's toolbar but have it retain the look of a button as if it was just in a plain panel.

For example, i want the button to look like this:

Button Style

However, it looks like this:

Toolbar Button

Thanks so much!

EDIT

Code to create toolbar:

xtype: 'toolbar',
        items:
        [
            {
                xtype: 'button',
                text: 'Select bounding box on map',
                id: 'bbBoxButton',
                icon: 'img/cross_cursor.gif',
                listeners: {
                    click: function(){
                        polygonControl.activate();
                    }
                }   
            }
        ]

Code to create regular button:

{xtype: 'button',    id: 'bboxButton', text: 'Select bounding box on map', icon: 'img/cross_cursor.gif', listeners: {click: function(){polygonControl.activate()}}}

I believe I have to use the cls config for the button, but i cannot seem to find the appropriate css class.

like image 593
gberg927 Avatar asked Dec 12 '11 16:12

gberg927


1 Answers

I had the exact same issue. To solve, I pass this into the button:

cls:'x-btn-default-small'
like image 189
sam Avatar answered Sep 28 '22 15:09

sam