View Full Version : [SOLVED] Adding label to toolbar with FIXED width...

5 Jul 2007, 3:53 AM
Hello 2 all,

Is there a way to add textItem to toolbar, but with specified width? I cannot see any config options in textItem, only String. For example, I would like to add:

var label = new Ext.Toolbar.TextItem({
text: 'some text',
I used toolbar.button for this purposes until now. I found it is not so useful, because of button's behaviour - it is clickable ;).

Is there some workaround for this? Thank you.

5 Jul 2007, 4:10 AM
I found a small workaround for this. The Code:

var tb = new Ext.Toolbar(toolbarContainer);
Ext.fly(tb.addText("Some Text Here").getEl().parentNode).setStyle('width', '150px');

Change the text and value according to your needs. Now you have your toolbars arranged!