Web Analytics Made Easy - Statcounter
Skip to content

ToolTip

Create a tooltip for a given widget (inspired by https://stackoverflow.com/a/36221216) This is an INTERNALLY USED only class. Users should not refer to this class at all.

ToolTip(
    widget,
    text,
    timeout = 400
)

Parameter Descriptions

Name Type Default Description
text str or None text for the tooltip. It can inslude . If None tip won't be shown
timeout int 400 Time in milliseconds that mouse must remain still before tip is shown
widget widget type varies The tkinter widget

Class Properties

This class has no public properties

Class Methods

 def enter
 def hidetip
 def leave
 def remove
 def schedule
 def showtip
 def unschedule

enter

Called by tkinter when mouse enters a widget

enter(
    event = None
)

Parameter Descriptions

Name Type Default Description
event None from tkinter. Has x,y coordinates of mouse

hidetip

Destroy the tooltip window

hidetip()

leave

Called by tktiner when mouse exits a widget

leave(
    event = None
)

Parameter Descriptions

Name Type Default Description
event None from tkinter. Event info that's not used by function.

remove

Removes a tooltip from a widget

remove()

schedule

Schedule a timer to time how long mouse is hovering

schedule()

showtip

Creates a topoltip window with the tooltip text inside of it

showtip()

unschedule

Cancel timer used to time mouse hover

unschedule()