 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do I display tooltips in Tkinter?
Tooltips are useful in applications where we need to display some information while hovering on a button.
In order to create and display a tooltip, we can use the Balloon property of tkinter.
Example
#Import the tkinter library from tkinter import * from tkinter.tix import * #Create an instance of tkinter frame win = Tk() #Set the geometry win.geometry("600x450") #Create a tooltip tip = Balloon(win) #Create a Button widget my_button=Button(win, text= "Hover Me") my_button.pack(pady=20) #Bind the tooltip with button tip.bind_widget(my_button,balloonmsg="www.tutorialspoint.com") win.mainloop()  Output
The above code will display the following window with a button "Hover Me". When the user hovers over the button, it will show a tooltip text.

Advertisements
 