[Python.NET] Creating Menu Items

2005-07-02 Thread Glen Mailer
According to the CLR spec, MenuItem objects have constructors in the form:

MenuItem(Text, Handler)
MenuItem(Text, Handler, Shortcut)

Yet using either of these in PythonNET i get a blank menu item, any
ideas why this isnt working?

sample:
def InitializeComponent(self):
FileOpen = 
WinForms.MenuItem("&Open",self.OnFileOpen,WinForms.Shortcut.CtrlO)
FileSave = 
WinForms.MenuItem("&Save",self.OnFileSave,WinForms.Shortcut.CtrlS)
FileExit = 
WinForms.MenuItem("E&xit",self.OnFileExit,WinForms.Shortcut.AltF4)

FileMenu = WinForms.MenuItem("&File", 
(FileOpen,FileSave,FileExit) )

self.Menu = WinForms.MainMenu( (FileMenu,) )

This produces a menu bar with a File menu having 3 entries, but all
three are blank.
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Overriding OnPaint

2005-07-02 Thread Glen Mailer
Is there a way of me to override the OnPaint method of a form or control?

The OnPaint Method of my Form subclass gets completely ignored.
_
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet