Ticker question

Christophe Leske wrote:

possible that you can't do what you want in a derived class. In that case then refactoring the base class to make it possible is usually what is done. Send patches for any changes you make to me.

Hi Robin,

Thank you very much for the info. I am ramping up to Python, but refactoring
the class is (still) out of my reach i think...

I'd like to have a draggable ticker (mouse down allows to drag text left and
right), as well as Unicode capable text for the ticker, since I just noticed
that the normal ticker class only allows normal ASCII/ANSI text,
apparently...

What can I do? I see that Ticker is derived from PyControl, yet it seems as
if PyControl is just the container Window for the ticker, right? Where is
the tickable text coming in?

The ticker draws its own text, see the OnPaint and DrawText methods.

To do what you want you'll have to override DrawText and change it to draw the text in segments (normal text and links will presumably have different attributes) and also add mouse sensitivity. When the mouse is clicked you'll need to calculate from the position if it is over a link and then do the same kinds of things that the HyperLinkCtrl does for launching the browser.

ยทยทยท

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