0

Background:

In recent days I've been experimenting with building many ordinary widgets from scratch in wxPython using the PyControl method of building custom controls as a personal challenge. However, I've hit issues when building a custom menu widget. By this I mean I am envisaging a button that when clicked on yields a drop down menu of options/commands etc.

Question:

What is the best way of achieving a completely custom menu widget in wxPython? Ideally I'd like to use only original code (i.e. as much as possible handled directly in the code). An ideal answer would include a runnable code snippet if possible.

Thanks for any help!

7
  • you mean this ? java2s.com/Tutorial/Python/0380__wxPython/Createpopupmenu.htm Commented May 19, 2014 at 23:47
  • Something like that, yes. Of course, I'm looking to make it from scratch rather than use existing tools if possible :)
    – MarkyD43
    Commented May 19, 2014 at 23:51
  • just draw a panel and put clickable lables ... no idea why you would want to re-invent that particular wheel... thats like asking how to make a frame widget (it uses native OS specific controls for both tasks) Commented May 19, 2014 at 23:53
  • I realise it's a pointless task rebuilding an existing widget, but like I said, I'm using it as a challenge to get used to wxPython.
    – MarkyD43
    Commented May 19, 2014 at 23:59
  • and yet then you ask for completely runnable code example? anyway ask and ye shall recieve Commented May 20, 2014 at 0:02

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.