Results 1 to 2 of 2

Thread: [SOLVED] Adding label to toolbar with FIXED width...

  1. #1
    Ext User violinista's Avatar
    Join Date
    Apr 2007
    Location
    Serbia
    Posts
    293

    Default [SOLVED] Adding label to toolbar with FIXED width...

    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:

    PHP Code:
                var label = new Ext.Toolbar.TextItem({
                    
    text'some text',
                    
    minWidth:100
                
    }); 
    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.
    Last edited by violinista; 5 Jul 2007 at 4:11 AM. Reason: Solved!
    "It is better to be young, pretty and rich instead old, ugly and poor."
    (c) Alan Ford.

  2. #2
    Ext User violinista's Avatar
    Join Date
    Apr 2007
    Location
    Serbia
    Posts
    293

    Default

    I found a small workaround for this. The Code:

    PHP 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!
    "It is better to be young, pretty and rich instead old, ugly and poor."
    (c) Alan Ford.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •