Fixed ToolTip on VariablesGrid columns on Windows
authorLaurent Bessard
Thu, 02 May 2013 10:21:47 +0200
changeset 2143 83a2e3db4c8c
parent 2142 f407a0e154c5
child 2144 bbd78ac226d0
Fixed ToolTip on VariablesGrid columns on Windows
etherlab/ConfigEditor.py
--- a/etherlab/ConfigEditor.py	Tue Apr 30 01:39:54 2013 +0200
+++ b/etherlab/ConfigEditor.py	Thu May 02 10:21:47 2013 +0200
@@ -1210,13 +1210,13 @@
     def OnModulesGridHeaderMotion(self, event):
         item, flags, col = self.ModulesGrid.HitTest(event.GetPosition())
         if col != self.LastToolTipCol and self.LastToolTipCol is not None:
-            self.ModulesGrid.SetToolTip(None)
+            self.ModulesGrid.GetHeaderWindow().SetToolTip(None)
             self.LastToolTipCol = None
-        if col > 0:
+        if col > 0 and self.LastToolTipCol != col:
             self.LastToolTipCol = col
             param, param_infos = self.ModuleLibrary.MODULES_EXTRA_PARAMS[col - 1]
-            wx.CallAfter(self.ModulesGrid.SetToolTip,
-                         wx.ToolTip(param_infos["description"]))
+            wx.CallAfter(self.ModulesGrid.GetHeaderWindow().SetToolTipString, 
+                         param_infos["description"])
         event.Skip()
 
 class DatabaseManagementDialog(wx.Dialog):