[wxPython-users] Creating Custom wxPython Widget

Christopher Anderson sidewinder.asu at gmail.com
Fri Dec 8 16:09:37 PST 2006


Robin Dunn wrote:
> However if you do decide to wrap your C++ widget then you will need to
> use SWIG.  This is because you will want the Python code to know that it
> derives from wx.Control (or whatever) and be able to use it like any
> other widget, so the SWIG runtime type system will have to be involved.
>   Be sure to use the same version of SWIG that wxPython is using,
> (currently 1.3.29, plus some patches, which you can get from the
> wxPython source tarball, or a pre-patched version is located at
> http://wxpython.wxcommunity.com/tools/)
>
> There is a page in the wiki that talks about this,
> http://wiki.wxpython.org/index.cgi/C++Extensions.  It's somewhat out of
> date, but it should get you pointed in the right direction.  You can
> also look at the non-core modules in the wxPython source tree for
> examples, such as wxPython/src/calendar.i.  There are also some 3rd
> Party extension modules out there that you could use as an example.

I tried the tutorial out, and it got me close but not enough to
successfully build the example "foobutton". I tried changing my .i
file based on calendar.i, but I still am having troubles. Is there any
chance someone could update the tutorial to a functioning state?

Thanks,
Chris Anderson




More information about the wxpython-users mailing list