On 1/23/2013 3:05 PM, Benjamin Jessup wrote:
> I just do the following, which seems to work (where "work" is defined by
> the tooltip hovering where the mouse cursor is):
>
 > import FloatCanvas as FC
> self.Canvas = FC.FloatCanvas(self)
>
> self.Canvas.tooltip = wx.ToolTip(tip='') # create an empty tooltip
> self.Canvas.tooltip.SetDelay(500) # set popup delay in ms
> self.Canvas.SetToolTip(self.Canvas.tooltip) # connect tooltip to canvas
> self.Canvas.tooltip.Enable(False) #Disable it
>
> ##
> # Floatcanvas event for hovering over a text box
> def NodeMouseOver(self, Object):
>    self.Canvas.tooltip.SetTip(tip='')
 >    msg = "Some Message I generate"
>    self.Canvas.tooltip.SetTip(tip=msg)
>    self.Canvas.tooltip.Enable(True)
>
> Not sure if agw behavior is different. Using 2.8.12.1 and 2.7.3
>

Code corrections make this easier to read :)

Likewise; I also call self.Canvas.tooltip.Enable(False) in the mouse 
leave function; and in the pan view function (just in case).

-- 
Benjamin Jessup
Mechanical Engineering Consultant

_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to