Clickable FancyStaticText link?

I want to place a clickable link on my wx.Panel and I think I'd like
to use the superscript ability of FancyStaticText to put little
superscript underlined question marks next to some of my controls that
will open up a help window.

Anyone done this? Is there already a ctrl that acts like this? I
assume I can do:

StaticText.SetFont( blue and underlined )
StaticText.SetCursor( hand cursor )

Can you bind mouse events to a StaticText?

I think you mean StaticFancyText, (in wx.lib.fancytext) right? If so, it is a simple subclass of wx.StaticBitmap, so your answer will depend on the platform because on wxGTK for example the native static controls are simply drawn directly on the parent and don't have a real widget of their own. I think mouse events work okay now, but I don't think that setting the cursor will.

Instead you could make your own StaticFancyText class that derives from the generic static bitmap class in wx.lib.statbmp. Since it is always a real widget on all platforms it should work okay.

···

On 8/31/10 1:54 PM, Mark wrote:

I want to place a clickable link on my wx.Panel and I think I'd like
to use the superscript ability of FancyStaticText to put little
superscript underlined question marks next to some of my controls that
will open up a help window.

Anyone done this? Is there already a ctrl that acts like this? I
assume I can do:

StaticText.SetFont( blue and underlined )
StaticText.SetCursor( hand cursor )

Can you bind mouse events to a StaticText?

--
Robin Dunn
Software Craftsman