How to disable a button

Paul Bowman shared this question 6 years ago
Answered

Hello


Is it possible to disable a button so that does not respond to clicks and appears 'greyed out'?


Thanks.

Comments (1)

photo
1

I presume you want to disable it by events, I am right? Because if you just want a button that look like disabled you just have to paint it that way and not assign any events on it. But if what you want is disable a button that look like activated and has events by events then you have to create events that trigger two actions, one to change the button style to 'greyed out' and another to deactivate the events. To deactivate the events I would create an image map on top of the button and mark it as hidden. Then, by events, I would show it or hide it depending if I want to have the button enabled or disabled.