Hello, and Happy New Year!
I have a lot of drawable buttons. Unfortunately, they weren’t displaying in their disabled state, no matter what I did.
Other Juce components disable very well. You can disable them, or you can disable any parent, and they redisplay fine.
When I dug down into it, I discovered that buttonStateChanged would need to be called for the image to change - but that setEnabled, either on the button’s parent components or on the button itself, does not trigger buttonStateChanged.
And unfortunately buttonStateChanged is protected.
So I ended up having to derive my own DrawableButton class to expose buttonStateChanged, then when I enable or disable, I walk the tree of components to find these buttons, and also call buttonStateChanged.
Is there a better way to do this?