Using the XML Resource to define a wxCalendar widget

I have the following node defined in a resource file

      <object class="sizeritem">
        <object class="wxCalendar">
          <size>-1,-1</size>
        </object>
      </object>

I get the error when I try to view it using the XRCed:

No handler found for XML node 'object', class 'wxCalendar'

Can someone point the way to 'handling' this node?

Thanks,
Mike

Hi,

Michael Beaulieu wrote:

No handler found for XML node 'object', class 'wxCalendar'

Can someone point the way to 'handling' this node?

Didn't you mean "wxCalendarCtrl" and not "wxCalendar"? If not and
wxCalendar is your own control, then you have to implement
wxXmlResourceHandler that handles it (see the docs; I don't know if
it is already possible from wxPython, though). Or you can use the
"unknown" pseudo-class (there's a demo of it in C++ XRC sample).

Regards,
Vaclav

- --
PGP key ID: 0x465264C9 (get it from wwwkeys.pgp.net)

Vaclav Slavik wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Michael Beaulieu wrote:

No handler found for XML node 'object', class 'wxCalendar'

Can someone point the way to 'handling' this node?

Didn't you mean "wxCalendarCtrl" and not "wxCalendar"? If not and wxCalendar is your own control,

It's a class in the wxPython library.

then you have to implement wxXmlResourceHandler that handles it (see the docs; I don't know if it is already possible from wxPython, though).

It is. There is a sample in the 2.3.3.1 demo of using a custom handler.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!