once running, it's not working quite right: the tooltip always is at the
bottom of the Window, though it does track the X location.
Hm, dunno. I'm running win32 (winxp), Python 2.4.3.
Maybe try updating your wx install.
I've tried with 2.6.3, same result.
I think this is a platform issue: I expect that GTK is putting the
tooltip at the bottom of the wx.Window it's on. this is really to bad,
as with larger Windows, that might not be what you want.
In fact, I have a need to add tooltips to a wx.lib.floatcanvas based
app, a I need to be able to place them where I need. I guess I'll send a
note to wxpython-users about this.
I've enclosed a wxpython tiny test app, to isolate matplotlib issues. It
has the same behavior. does the tooltip follow the mouse on Windows (or
OS-X)
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[EMAIL PROTECTED]
#!/usr/bin/env python2.4
import wx
class DemoPanel(wx.Panel):
"""
A very minimal Panel to test Tooltips.
"""
def __init__(self, *args, **kwargs):
kwargs['size'] = (200,200)
wx.Panel.__init__(self, *args, **kwargs)
self.tooltip = wx.ToolTip(tip='A tool tip') # create an empty tooltip
#self.tooltip = wx.TipWindow(self, text = "A tip Window")
#self.tooltip.Hide()
self.tooltip.SetDelay(100) # set popup delay in ms
self.SetToolTip(self.tooltip) # connect tooltip to canvas
# self.Bind(wx.EVT_LEFT_DOWN, self.OnLeft)
self.Bind(wx.EVT_MOTION, self.OnMove)
self.MoveTip = None
def OnMove(self, event=None):
self.tooltip.SetTip(tip='x=%f, y=%f' % (event.GetX(), event.GetY()))
class DemoFrame(wx.Frame):
""" This window displays a button """
def __init__(self, title = "Micro App"):
wx.Frame.__init__(self, None , -1, title)
MenuBar = wx.MenuBar()
FileMenu = wx.Menu()
item = wx.MenuItem(FileMenu, text = "&Quit")
FileMenu.AppendItem(item)
self.Bind(wx.EVT_MENU, self.OnQuit, item)
MenuBar.Append(FileMenu, "&File")
self.SetMenuBar(MenuBar)
P = DemoPanel(self)
self.Fit()
def OnQuit(self,Event):
self.Destroy()
app = wx.App()
frame = DemoFrame()
frame.Show()
app.MainLoop()
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users