Hi,
I'm new to GUI programming, but am finding wxWindows very easy, which
surprises me, but anyway...
I'm wondering how you are meant to create sub-menu's. The online
documentation is very hard to navigate, and i can't find anything
explaining how one can do this.
the code I'm trying to use, is this:
···
----
#create the sub menu's for the hardware menu.
hard_commenu = wxMenu()
hard_commenu.Append(ID_COM1,"Use Com&1 (/dev/ttyS0)","Use
Com1.")
hard_commenu.Append(ID_COM2,"Use Com&2(/dev/ttyS1)","Use Com2.")
hard_commenu.Append(ID_COM3,"Use Com&3(/dev/ttyS2)","Use Com3.")
hard_commenu.Append(ID_COM4,"Use Com&4(/dev/ttyS3)","Use Com4.")
#append this to the parent menu:
#create "hardware menu"
hardmenu = wxMenu()
#append capture port menu's
hardmenu.Append(hard_commenu,"Capture Port")
----
Now, this would seem to be the logical way to do it, but then again,
I've never done any GUI programming before, so maybe it's completely
wrong. the error message I'm getting is this:
...
hardmenu.Append(hard_commenu,"Capture Port")
File "/usr/lib/python2.2/site-packages/wxPython/windows.py", line 809,
in Append val = apply(windowsc.wxMenu_Append,(self,) + _args,
_kwargs) AttributeError: wxMenu instance has no attribute '__int__'
any ideas?
another *small* issue, is that i can't seem to find a list of keywords i
can use in the wxDialog class to specify icon types. so far i know of
wxICON_INFORMATION, but can't seem to find any others in the
documentation.
thanks,
--
Thomi Richards,
thomi@thomi.imail.net.nz