0

clear attribute set with setWidgetAttribute

asked 2015-03-20 13:30:38 +0800

ansancle gravatar image ansancle
317 9

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!

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-03-20 13:30:38 +0800

Seen: 18 times

Last updated: Mar 20 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More