def OnMouseOver(self, evt):
""" mouse over on a tab """
# display the tooltip if our title is not the same as our
original_args
desc = None
n = self.GetSelection()
if n != -1:
p = self.pages.get(self.GetPageText(n))
if p is not None and p.s.original_line is not None:
if p.display_name != p.s.original_line:
desc = p.s.original_line
self.SetToolTipString(desc or '')
evt.Skip()
mouse over is triggered correctly and the Tooltip appears to set
without error (I set desc to not '')
but no tip appears?
a side question - in theory this should work for a non-active tab, but
how to I get a reference to tab that I am currently hovering over?
def OnMouseOver(self, evt):
""" mouse over on a tab """
# display the tooltip if our title is not the same as our
original_args
desc = None
n = self.GetSelection()
if n != -1:
p = self.pages.get(self.GetPageText(n))
if p is not None and p.s.original_line is not None:
if p.display_name != p.s.original_line:
desc = p.s.original_line
self.SetToolTipString(desc or '')
evt.Skip()
mouse over is triggered correctly and the Tooltip appears to set
without error (I set desc to not '')
but no tip appears?
The tabs are implemented using a child window, so you would probably need to set the tooltip on that window instead of self.
a side question - in theory this should work for a non-active tab, but
how to I get a reference to tab that I am currently hovering over?
The AuiTabContainer class has a TabHitTest method that sounds promising.
> def OnMouseOver(self, evt):
> """ mouse over on a tab """
> # display the tooltip if our title is not the same as our
> original_args
> desc = None
> n = self.GetSelection()
> if n != -1:
> p = self.pages.get(self.GetPageText(n))
> if p is not None and p.s.original_line is not None:
> if p.display_name != p.s.original_line:
> desc = p.s.original_line
> self.SetToolTipString(desc or '')
> evt.Skip()
> mouse over is triggered correctly and the Tooltip appears to set
> without error (I set desc to not '')
> but no tip appears?
The tabs are implemented using a child window, so you would probably
need to set the tooltip on that window instead of self.
> a side question - in theory this should work for a non-active tab, but
> how to I get a reference to tab that I am currently hovering over?
The AuiTabContainer class has a TabHitTest method that sounds promising.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org