-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I handle enabling/disabling some custom buttons I built off Hbox/VBox using css and my own widgetListeners. One issue I have run into is to have a :active setting in my css which gives button press feedback is that I need to disable the html component itself to prevent this from happening when a button is disabled.
For example, I have an OK button that when they press it highlights green. If I disable that button, I change the opacity to grey it out and I disable the event handlers so that no action is taken if the user presses it. I have to setWidgetAttribute("disabled","disabled") as well to prevent that green highlight caused by the :action setting in the css. That css is acting purely on the html component, which is why I have to set disabled on it so it knows not to activate the ":action" css.
Unfortunately, calling setWidgetAttribute("disabled","false") doesn't undo the setting. It stays disabled so when I re-enable that button and press it, I no longer get the :action css showing the green highlight. Is there another way to clear that widget attribute? What am I missing? Thanks!
Asked: 2015-03-20 13:30:38 +0800
Seen: 18 times
Last updated: Mar 20 '15