Button mouseRelaesed event not constrained by Enabled

Just seen that the Button mouseReleased event does not depends on the Enabled property value: it fires even if Enabled==False. As a workaround I just test the property value before executing any action.
Is that a feature?

Thanks in advance, regards

you should probably use on action performed for buttons

Thanks victor. That’s one idea, but if you need to show a popup menu by calling system.gui.createPopupMenu(itemNames, itemFunctions) and you need to have it shown on left mouse button click, your only possibility is to use mousePressed or mouseReleased where you find event.x, event.y you need.

Thanks, regards

Yes, this is by design. It’s debatable but disabled components still fire mouse events ‘on purpose’ - it’s up to you in scripting to filter out disabled components.

Ok PGriffith, thank you very much for your support.

Regards