I'd like to hide and disable a ButtonField at runtime.
I don't really see a straight forward way to do it.
In the Field, class there are methods like:
Also, in the ButtonField class, there is this method:
...So, I was hoping to find a couple of methods like:
...but no such luck.
I can see a couple of work arounds to get the result I want.
For example, I can simply use the Manager.delete() method to delete my field.
And then when I need for it to be visible again, I can:
- First: Delete all the fields below (or to the right of it).
- Second: Re-add the field (using Manager.add() method).
- Third: Re-add all the fields below (or to the right of it).
However, it seems like I'm going about it the wrong way if I have to do all that. There's gotta be some more straight forward approach to this. Am I missing the big picture? (I.e. is there a completely different approach to handling GUI fields which I'm just not seeing)?.