thelost
thelost

Reputation: 705

How to get clicks on disabled buttons with wxpython?

I have a disabled button, and it does not receive clicks when I use EVT_BUTTON on it. Is there a way to receive clicks even when it has been Disabled()?

Upvotes: 1

Views: 111

Answers (2)

Mike Driscoll
Mike Driscoll

Reputation: 33111

The whole point of disabling a button is so that the EVT_BUTTON event is not fired. I'm sure you could create create an ugly hack using EVT_LEFT_DOWN and detecting where the mouse is in your app as a workaround, but why bother? This is intended behavior.

Upvotes: 2

Dima Tisnek
Dima Tisnek

Reputation: 11775

Perhaps wxpython has a mechanism similar to pygtk.

In pygtk you create a input-only (that is transparent) window over the widget you want to get clicks for and get your clicks there.

Upvotes: 0

Related Questions