>This is with 2.8.10 on Debian/Squeeze, btw.
I don't recall if wx.StaticBitmap (and other "static" widgets) on
wxGTK are now getting all of the mouse events,
I see. Is there a way to find out ?
but there was a time
in the past where they did not. (Because they are not true widgets
at the platform level, just drawn directly on the parent.)
That would surely explain what I'm seeing.
Does that theory hold against the fact that standard
wxPython tooltips as per
bmp = wx.StaticBitmap(...)
bmp.SetToolTipString(...)
work just fine on those bitmaps ?
You may want to test this theory by setting the tip's
target to some other widget in your app,
When I do this:
tip = agw_stt.SuperToolTip(fname)
tip.SetTarget(self)
where "self" is the panel the bitmaps are on I get this
traceback on mouseover:
2010-09-28 12:18:56 DEBUG gm.gui (/home/ncq/Projekte/gm-git/gnumed/gnumed/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx() #46): unhandled exception caught:
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/agw/supertooltip.py", line 212, in OnPaint
topColour, middleColour, bottomColour = classParent.GetTopGradientColour(), \
File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/lib/agw/supertooltip.py", line 1060, in GetTopGradientColour
return self._topColour
AttributeError: 'SuperToolTip' object has no attribute '_topColour'
which at least proves something is happening. Setting the
three gradient colors manually on creation makes the
supertooltip work on the panel. Which would mean that the
supertooltip implementation in Debian/Squeeze's wxPython
2.8.10 lacks appropriate defaults.
But which also seems to show that, indeed, the standard
bitmaps do not receive the enter/leave events.
or replacing the wx.StaticBitmaps with the
generic widget in wx.lib.statbmp.
That works and the tooltip appears.
Thanks,
Karsten
···
On Mon, Sep 27, 2010 at 09:20:09AM -0700, Robin Dunn wrote:
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346