Disabled button but it still working

I need to disable the buttons, but when this property is on it just changes the background color and the button still works. Do you know what the problem may be?

I am using version 7.9.8

Do you have your script in the button action or button mouse pressed?

2 Likes

Enabled only affects the onClicked actionPerformed action, the other mouse event handlers will still run, as @jpark alluded to. Either move your script to the onClicked actionPerformed event, or add a condition that checks the enabled property first

1 Like

Are you sure it blocks onClicked? I thought enabled/disabled only affected actionPerformed.

2 Likes

:flushed: whoops, yep that was my bad!