What is the best way to establish a wxPython event handler for a mouse click, button and so on? I have looked at a number of sample codes and the event handlers differ all over the place.
Ene Uran
638
Posting Virtuoso
Recommended Answers
Jump to PostI have looked up some of the wxPython event handlers I have used over time. You are right there are different versions, some are outdated, some are personal preference. I prefer the version used by button4 or the mouse clicks on the parent frame ...
# checking …
Jump to Post...
Also, why are you using self.button1 = Button( ... ) and not just button1 = Button( ... )?The self. prefix makes the button global within the class, so it can be used by methods of the class.
All 5 Replies
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Ene Uran
638
Posting Virtuoso
bumsfeld
413
Nearly a Posting Virtuoso
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Ene Uran
638
Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.