Using maskededit controls with xrc and wxpython
happy at opensourcery.net
Mon Jun 14 22:05:52 CEST 2004
I'm having problems getting IpAddrCtrl working with a frame containing
nested sizers generated from an xrc file.
Firstly I tried adding it using AttachUnknownControl as per the
example code Using XMLResources on the wxPython wiki. This renders but
does not size correctly despite my trying many different variations.
Because of my nested sizers I also seem to have to SetSizeHints etc at
a higher level than in the example. Also I note that some of the
functions used are marked in the wxWidgets docs as "for internal use
Secondly I tried using subclassing as per the XMLResource*.py demos in
the wxWigets/wxPython. This has the problem that it uses 2 stage
creation which IPAddrCtrl etc doesnt support out of the box (yet?). As
a Python newbie I'm still finding my way around so dont know how
difficult that is to implement.
I also note that XmlSubclassFactory_Python in wx/xrc.py will only
instantiate a control using klass = getattr(module, cname) then
klass() which does not allow for any parameter passing at that stage.
Can anyone point me in the right direction? I need to get forward with
my overall development and can't afford to get stuck on something that
admittedly I had hoped would be "routine" to implement.
More information about the Python-list