XRC and wxTicker example...

My objective is to find a working example of a subclass or custom control and how it would be specified in XRC. I chose wxTicker because there was already a wxTickerXmlHandler for it in my install of 2.6.3.3 but I can’t seem to get it working.

How is it specified in the XRC?

My ticker text

or like this?

My ticker text

Then there is a question of whether anything in the application code has to change to register that handler or would is it already registered? Is the XmlResourceHandler essential? That is, would I need to write a resource handler if I
wanted to specify a wx.lib.hyperlink in xrc?

Any suggestions or pointers are welcome.

thanks,
Lance

···

8:00? 8:25? 8:40? Find a flick in no time
with theYahoo! Search movie showtime shortcut.

Jay Lance wrote:

My objective is to find a working example of a subclass or custom control and how it would be specified in XRC. I chose wxTicker because there was already a wxTickerXmlHandler for it in my install of 2.6.3.3 but I can't seem to get it working.

How is it specified in the XRC?

<object class="wxTicker">
   <text>My ticker text</text>
</object>

or like this?

<object class="wxTicker" subclass="wx.lib.ticker">
   <text>My ticker text</text>
</object>

Since there is a wxTickerXmlHandler class then the first one above is the right way to tell XRC to use that class.

Then there is a question of whether anything in the application code has to change to register that handler or would is it already registered?

Yes, you need to create an instance of wxTickerXmlHandler and pass it to wx.xrc.XmlResource.AddHandler

Is the XmlResourceHandler essential? That is, would I need to write a resource handler if I wanted to specify a wx.lib.hyperlink in xrc?

Yes.

···

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