Results 1 to 4 of 4

Thread: remove item from toolbar

  1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    264
    Vote Rating
    0
      0  

    Default remove item from toolbar

    Hello !

    Sorry it's to heat in germany.
    I have a simple question.
    In my project is a toolbar with same buttons.
    I will remove a button from the toolbar.

    var tool = Ext.getCmp('toolbar');
    tool.items[1].remove();

    tool.doLayout();
    dont work.

    Greetings Stephan

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    90
      0  

    Default

    Read your code.

    Compare it to the docs.

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    264
    Vote Rating
    0
      0  

    Default Solved

    Hi !

    I have the problem solved



    // My toolbar
    tool = Ext.getCmp('toolbar');

    // the items of the toolbar
    var teile = tool.items;

    // remove the items
    teile.each(function(item,index,length){
    tool.remove(item);
    });

    // make new items
    for(var i=0;i < antwort.buttonname.length;i++){
    button(antwort.buttonname[i],antwort.schaltung[i]);
    }
    Stephan

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    90
      0  

    Default

    So you really REALLY don't like to read documentation then?

Posting Permissions

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