1. #1
    Sencha User genius551v's Avatar
    Join Date
    Mar 2007
    Posts
    287
    Vote Rating
    0
    genius551v is on a distinguished road

      0  

    Default toolbar...

    toolbar...


    can you tell me how is the code to Disable and after Enable a buton in the tool bar ? ?

    and can you tell me how add an other element for example a textbox to serch or symple text or something like that ? ?

    i have this code:

    Code:
    toolbar = function(){
    
    return {
            init : function(){
                var tb = new YAHOO.ext.Toolbar('toolbar');
                tb.addButton({text: 'Add', className: 'tb-btn-add', click: adicionar});
                tb.addSeparator();
                tb.addButton({text: 'Mod', className: 'tb-btn-mod', click: modificar});
                tb.addSeparator();
                tb.addButton({text: 'Del', className: 'tb-btn-del', click: eliminar});
                tb.addSeparator();
                tb.addButton({text: 'Clear', className: 'tb-btn-clear', click: limpiar});
                tb.addSeparator();
                tb.addButton({text: 'Serch', className: 'tb-btn-consult', click: consultar});
            }
        };  
    }();
    really tnks...

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    tb.addButton() returns a ToolbarButton object. That object has enable(), disable() and other functions.

    You can add anything to the toolbar via the add() method.

    Code:
    var textfield = document.getElementById('miField');
    toolbar.add(textfield);

  3. #3
    Sencha User genius551v's Avatar
    Join Date
    Mar 2007
    Posts
    287
    Vote Rating
    0
    genius551v is on a distinguished road

      0  

    Default


    Great...tnks!

Similar Threads

  1. Border Layout + Toolbar + Scrolling = Non Static Toolbar
    By PuritysDisciple in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 5 Feb 2007, 11:41 AM

Thread Participants: 1