[wxPython-users] Re: click on text

Paul Sijben sijben at eemvalley.com
Mon Aug 27 00:48:40 PDT 2007


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:
> On 2007-08-24, Paul Sijben <sijben at eemvalley.com> wrote:
>
>   =

>> 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)
>         =

>
>   =

>> 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
>>
>>     =

>
>
>   =


-- =

Paul Sijben                    	tel: +31334566488
Eemvalley Technology       	fax: +31334557523
the Netherlands                	http://eemvalley.com    =


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200708=
27/78b6cf57/attachment.htm


More information about the wxpython-users mailing list