1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    NYC
    Posts
    182
    Vote Rating
    0
    whodat is on a distinguished road

      0  

    Default Unanswered: Update Button Text on docked item

    Unanswered: Update Button Text on docked item


    Hi I have window with a form panel in it. The form panel contains an array of buttons 'create' and 'reset'.

    I'd like to change the text on one of the buttons.

    I'm able to get the toolbar that contains the items but not exactly sure what how to change the text of the create button.

    Code:
    var bbar = editCompanyWindow.down('form').getDockedItems('toolbar[dock="bottom"]');
    Any help would be greatly appreciated.

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Location
    Hyderabad
    Posts
    102
    Answers
    9
    Vote Rating
    13
    Zinnia will become famous soon enough

      0  

    Default


    You can try like
    vat butn = bbar.items.items[0];
    butn.setText("Name");

  3. #3
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,098
    Answers
    113
    Vote Rating
    96
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    you can access it by index as shown above or you can assign an itemId to your button and use .down('#buttonID'). this way, its independent of the index (in case you add or remove buttons later). itemId doesnt have to be unique application wide and is better to use (compared to id).

Thread Participants: 2