Editing ExtJS Button Text

Iam design Button in ExtJS with the text “Show”, when I click the button, I want to change the text as “Hide”, How can I handle this Plz Help me

Thanks in advance

+7
source share
2 answers

Use the button click event and change the text to "Hide."

listeners : { click: function(button,event) { button.setText('Hide'); } } 
+21
source

If you work with mvc, you will use this code

  'widgetName button[text=Show]':{ click : function (button, el) { button.setText('Hide'); } } 
+5
source

All Articles