click on text

I am trying to make some (dynamic) text in my app into a hotspot (so it
will have a tooltip and be clickable). I just tried to do that by making
the text into a transparent, borderless button. While it looks great on
GTK linux, it looks horrible on WinXP in the classic view as WinXP
insists on putting the borders around the button.

I don't know about tooltips, but for clickable text I use this:

class ClickableLabel(wx.StaticText):
    def __init__(self, parent, handler,*args,**kwargs):
        wx.StaticText.__init__(self,parent,*args,**kwargs)
        self.Bind(wx.EVT_LEFT_UP,handler)

···

On 2007-08-24, Paul Sijben <sijben@eemvalley.com> wrote:
        

There must be a better way around this. Should I change the buttons into
textctrls and try and get mouse events from them or is there a better
way than that?

Paul

--
Grant Edwards grante Yow! HUGH BEAUMONT died
                                  at in 1982!!
                               visi.com

Robin, Grant,

thank you both for the answers. wx.lib.hyperlink looks very
interesting, however for this particular thing the links I have are not
URLs and I want some more items in the right-click menu, so let’s see
if I can edit hyperlink.py a bit.

Paul

Grant Edwards wrote:

···

sijben@eemvalley.com

-- Paul Sijben tel: +31334566488
Eemvalley Technology fax: +31334557523
the Netherlands

http://eemvalley.com