Problems loading panel from XRC

Jorgen Bodde jorgen.maillist at gmail.com
Tue Sep 26 11:17:04 PDT 2006


Hi guys,

Using DialogBlocks 2005 - v3.10 I exported XRC and I am loading this
with the following code:

class WikEdFrame(wx.Frame):
    def __init__(self, parent):
        """ Constructor of the main frame """
        wx.Frame.__init__(self, parent, -1, "WikEd v1.0", size=(400,200),
                          style=wx.DEFAULT_FRAME_STYLE |
wx.NO_FULL_REPAINT_ON_RESIZE)

        ## invoke window from XRC
        res = xrc.XmlResource("wiked.xrc")
        panel = res.LoadPanel(self, "ID_WIKEDMAIN")

It works, but I get errors. The following errors are thrown at me but
the panel is succesfully loaded. Does anybody know why this happens?

20:09:25: Subclass 'WikedMain' not found for resource 'ID_WIKEDMAIN',
not subclassing!
20:09:25: Unknown style flag wxHSCROLL
20:09:25: Unknown style flag wxVSCROLL

The first error puzzles me. Is the XRC code wrong that DialogBlocks
produces? The second and third ones are probably new in wxWidgets
newer then the ones used by wxPython?

The first error comes from this line;

<object class="wxPanel" name="ID_WIKEDMAIN" subclass="WikedMain">

I do not know why the subclass line is there. Any ideas?

With regards,
- Jorgen




More information about the wxpython-users mailing list