[python-win32] Dialogs + Menus

Kerry Oliphant koliphant at qwest.net
Fri Sep 24 03:35:50 CEST 2004


Eric,

Use 'win32ui.CreateMenu()' to create a 'PyCMenu' object and use the methods
of that object to populate the menu as you wish.  Then use the dialog
window's 'SetMenu()' method to assign your created menu to the dialog.
After that you can put some 'HookCommand()' calls in your dialog
'OnInitDialog()' method to associate the menu ID's with methods in your
dialog class.

Kerry


-----Original Message-----
From: python-win32-bounces+koliphant=qwest.net at python.org
[mailto:python-win32-bounces+koliphant=qwest.net at python.org]On Behalf Of
Eric
Sent: Monday, September 20, 2004 2:49 PM
To: python-win32 at python.org
Subject: [python-win32] Dialogs + Menus


I am new to the list but have been using the python-win32 libraries
extensively and with great sucess on a new product (www.imvu.com). I've
created several dialog boxes using variations on the demos that ship with
pywin32 with great success. What I want to add now is adding menu bars to
these windows, which I have not been able to figure out how to do. Does
anyone have any suggestions?

_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32



More information about the Python-win32 mailing list