Skip to content

Commit 669e4f1

Browse files
feat # Python Tkinter Ballon Text Tools complete
Python Tkinter How to Reset a Spinbox with Tkinter complete resolvesr: # se also: #
1 parent 5e353f0 commit 669e4f1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Python Tkinter Ballon Text Tools/ballonTextToolTips.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,38 @@
22
# Herramientas de texto de globo de Python Tkinter
33

44
from tkinter import *
5+
from tkinter.tix import *
56

67
root = Tk()
78
root.title("Python Tkinter Ballon Text Tools")
89
root.iconbitmap("Python Tkinter Ballon Text Tools/icons/balloons.ico")
910
root.geometry('500x350')
1011

12+
# Create Tolltio
13+
tip = Balloon(root)
14+
tip.config(bd=10, bg="blue")
15+
16+
# sub caterories
17+
tip.label.config(bg="red", fg="green", bd=10)
18+
tip.message.config(bg="red", fg="white")
19+
20+
# Button
21+
my_button = Button(root, text="Click me!")
22+
my_button.pack(pady=50)
23+
24+
# Label
25+
my_label = Label(root, text="Some Text", font=("Helvetica", 20))
26+
my_label.pack(pady=20)
27+
28+
# Label
29+
my_label = Label(root)
30+
# Bind tooltip to Button
31+
tip.bind_widget(my_button, balloonmsg="This is my awersome toolstip!")
32+
33+
# Bind tooltip to Button
34+
tip.bind_widget(my_label, balloonmsg="This is my awersome toolstip!")
35+
36+
37+
38+
1139
root.mainloop()

0 commit comments

Comments
 (0)