James
James

Reputation: 47

wxpython button held down event

hey all, im looking for a way of catching a button held down event in wxpython i cant seem to find anything. theres just wx.EVT_BUTTON which isnt quite what i want. i want my event to continue processing as long as the button is down. any help would be appreciated thanks james

Upvotes: 1

Views: 1429

Answers (1)

Mike Driscoll
Mike Driscoll

Reputation: 33111

I think I would catch the EVT_LEFT_DOWN and the EVT_LEFT_UP. Then start a wx.Timer to run your process on EVT_LEFT_DOWN until the EVT_LEFT_UP is fired. Alternatively, you could use a ToggleButton.

Upvotes: 2

Related Questions