Search code examples
extjsextjs4

How can I create a button initially hidden in ExtJS?


I have a toolbar with some buttons and one of the buttons needs to be invisible at creation and visible at some point in my app.

I'm currently adding the button when it needs to be visible but that is not exactly what I want.


Solution

  • When you create the button you can set hidden: true in the config.

    Or you can 'hide()' the button soon after adding it and then 'show()' it at a later date.