9

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.

gberg927
  • 1,636
  • 9
  • 38
  • 51

2 Answers2

6

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

cls:'x-btn-default-small'
sam
  • 101
  • 4
2

Adding this

ctCls: 'x-btn-over'

to button config solved the issue for me in Ext 2.2.1

machinery
  • 3,793
  • 4
  • 41
  • 52