1. #1
    Sencha User
    Join Date
    Nov 2007
    Location
    London, UK
    Posts
    583
    Vote Rating
    -1
    mabello is an unknown quantity at this point

      0  

    Default Ext.Toolbar configurable Spacer: extending Ext.Toolbar.Spacer

    Ext.Toolbar configurable Spacer: extending Ext.Toolbar.Spacer


    I had the need to create and put in a toolbar a text field in a configurable position (let say in the middle).
    So I have created a small configurable spacer that do the job for me, extending Ext.extend(Ext.ux.MyFill, Ext.Toolbar.Spacer);

    Code:
    PHP Code:
    Ext.ux.MyFill = function(tWidth){
        
    Ext.ux.MyFill.superclass.constructor.call(this);

        var 
    width tWidth;
        
        
    this.render = function(td){
            
    td.style.width width;
            
    Ext.Toolbar.Fill.superclass.render.call(thistd);
        }
    }
    Ext.extend(Ext.ux.MyFillExt.Toolbar.Spacer); 
    Usage:
    PHP Code:
    panel.getTopToolbar().addItem(new Ext.ux.MyFill('45%')); 
    Cheers

  2. #2
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Hi,

    Excellent work! Have you add this plugin in TreeFilterPanel for configure the position of the searchfield?

    If you calculate the width of the toolbar and resize the textfield, with this plugin, you can auto-adjust the serachfield in to the toolbar (like MSN messenger serachfield)

    Is posible?

    Thanks in advance,

  3. #3
    Sencha User
    Join Date
    Nov 2007
    Location
    London, UK
    Posts
    583
    Vote Rating
    -1
    mabello is an unknown quantity at this point

      0  

    Default


    Thanks galdaka.
    I've tried to fix the problem with the accordion layout in TreeFilterPanel plugin, but I think the main problem is that the accordion layout is a little bit buggy, so it's not so trivial to fix that...
    Hence, I have not try to alculate the width of the toolbar and resize the textfield yet, but I will give it a shot, I think it could be achievable.

    Thanks

Thread Participants: 1