( self, wdgt, msg=None, msgFunc=None, follow=1 )
Initialize the ToolTip
		Arguments:
			wdgt: The widget to which this ToolTip is assigned
			msg:  A static string message assigned to the ToolTip
					if msg istype integer - search for text in TipLines
			msgFunc: A function that retrieves a string to use as the ToolTip text
			delay:   The delay in seconds before the ToolTip appears(may be float)
			follow:  If True, the ToolTip follows motion, otherwise hides
Initialize the ToolTip
		Arguments:
			wdgt: The widget to which this ToolTip is assigned
			msg:  A static string message assigned to the ToolTip
					if msg istype integer - search for text in TipLines
			msgFunc: A function that retrieves a string to use as the ToolTip text
			delay:   The delay in seconds before the ToolTip appears(may be float)
			follow:  If True, the ToolTip follows motion, otherwise hides
Initialize the ToolTip Arguments : wdgt : The widget to which this ToolTip is assigned msg : A static string message assigned to the ToolTip if msg istype integer - search for text in TipLines msgFunc : A function that retrieves a string to use as the ToolTip text delay : The delay in seconds before the ToolTip appears ( may be float ) follow : If True the ToolTip follows motion otherwise hides
def __init__( self, wdgt, msg=None, msgFunc=None, follow=1 ):
		"""
		Initialize the ToolTip
		Arguments:
			wdgt: The widget to which this ToolTip is assigned
			msg:  A static string message assigned to the ToolTip
					if msg istype integer - search for text in TipLines
			msgFunc: A function that retrieves a string to use as the ToolTip text
			delay:   The delay in seconds before the ToolTip appears(may be float)
			follow:  If True, the ToolTip follows motion, otherwise hides
		"""
		self.wdgt = wdgt
		# The parent of the ToolTip is the parent of the ToolTips widget
		self.parent = self.wdgt.master
		# Initalise the Toplevel
		Toplevel.__init__( self, self.parent, bg='black', padx=1, pady=1 )
		self.withdraw()  # Hide initially
		# The ToolTip Toplevel should have no frame or title bar
		self.overrideredirect( True )
		# The msgVar will contain the text displayed by the ToolTip
		self.msgVar = StringVar()
		self.TipID = None
		self.TipNumText = ""
		try:
			if msg is None:
				self.msgVar.set('No tooltip provided')
			elif type(msg) is int:	# lookup tooltip text in file
				self.TipID = msg
				self.msgVar.set(ToolTip.GetTooltipText(msg))
				self.TipNumText = "Tip number %d\n\n" % self.TipID
			else:	# assume a string is passed
				self.msgVar.set( msg )
		except:
			self.msgVar.set('ERROR getting tooltip')
		self.msgFunc = msgFunc		# call this function to return tip text
		self.follow = follow			# move tip if mouse moves
		self.visible = 0
		self.lastMotion = 0
		# The test of the ToolTip is displayed in a Message widget
		Message( self, textvariable=self.msgVar, bg='#FFFFDD',
					aspect=250 ).grid()
		# Add bindings to the widget.  This will NOT override bindings
		# that the widget already has
		self.wdgt.bind( '<Enter>', self.spawn, '+' )
		self.wdgt.bind( '<Leave>', self.hide, '+' )
		self.wdgt.bind( '<Motion>', self.move, '+' )
def __init__ ( self , wdgt , msg = None , msgFunc = None , follow = 1 ) : self . wdgt = wdgt # The parent of the ToolTip is the parent of the ToolTips widget self . parent = self . wdgt . master # Initalise the Toplevel Toplevel . __init__ ( self , self . parent , bg = 'black' , padx = 1 , pady = 1 ) self . withdraw ( ) # Hide initially # The ToolTip Toplevel should have no frame or title bar self . overrideredirect ( True ) # The msgVar will contain the text displayed by the ToolTip self . msgVar = StringVar ( ) self . TipID = None self . TipNumText = "" try : if msg is None : self . msgVar . set ( 'No tooltip provided' ) elif type ( msg ) is int : # lookup tooltip text in file self . TipID = msg self . msgVar . set ( ToolTip . GetTooltipText ( msg ) ) self . TipNumText = "Tip number %d\n\n" % self . TipID else : # assume a string is passed self . msgVar . set ( msg ) except : self . msgVar . set ( 'ERROR getting tooltip' ) self . msgFunc = msgFunc # call this function to return tip text self . follow = follow # move tip if mouse moves self . visible = 0 self . lastMotion = 0 # The test of the ToolTip is displayed in a Message widget Message ( self , textvariable = self . msgVar , bg = '#FFFFDD' , aspect = 250 ) . grid ( ) # Add bindings to the widget.  This will NOT override bindings # that the widget already has self . wdgt . bind ( '<Enter>' , self . spawn , '+' ) self . wdgt . bind ( '<Leave>' , self . hide , '+' ) self . wdgt . bind ( '<Motion>' , self . move , '+' )