Vidyalelo
Python · Q31

GUI Programming with Python

Programming · Python · question 31

Q31

How do you add a tooltip to a widget in Tkinter?

A.
widget.add_tooltip("Tooltip text")
B.
Tooltip(widget, text="Tooltip text")
Answer
C.
widget.tooltip("Tooltip text")
D.
add_tooltip(widget, "Tooltip text")

Answer: Option B

Solution

Answer: Option B
Solution:
The Tooltip(widget, text="Tooltip text") method is used to add a tooltip to a widget in Tkinter.