Michael Houck wrote:
I have some static text that I want the user to be able to click on and
have an event fire. I have a main frame with a panel inside it, the text
is in that panel.First I tried putting this code in the panel:
self.someText = wxStaticText(self, TEXT_ID, "SomeText")
self.Connect(TEXT_ID, -1, wxEVT_LEFT_UP, self.textFunction)
No luck... absolutely nothing happens. I figured that wxStaticText just
didn't trigger events...
I don't know if this will work, but it is something to try.
Instead of using wx.StaticText, do the following -
from wx.lib.stattext import GenStaticText
self.someText = GenStaticText(...)
In my case I wanted to associate a tooltip with a static text control. It
would not work with wx.StaticText, but it did work with GenStaticText.
Good luck
Frank Millman