-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.py
35 lines (23 loc) · 1.22 KB
/
examples.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from CustomTkinterMessagebox import *
import customtkinter as ct
def main():
root = ct.CTk()
root.geometry("300x600")
root.title('Test Window')
l1 = ct.CTkLabel(root, text='')
l1.pack()
b1 = ct.CTkButton(root, text="Normal Button", command=lambda:CTkMessagebox.messagebox())
b1.pack(pady=10)
b2 = ct.CTkButton(root, text="Variables Button", command=lambda:CTkMessagebox.messagebox(title='Warning!', text='Error. No link was given.'))
b2.pack(pady=10)
fs = 'f string'
b3 = ct.CTkButton(root, text='F string text test', command=lambda:CTkMessagebox.messagebox(title='F String Test', text=f'This is a {fs} test!'))
b3.pack(pady=10)
b4 = ct.CTkButton(root, text="No sound test", command=lambda:CTkMessagebox.messagebox(title='No sound example!', text='No sound here.', sound='off'))
b4.pack(pady=10)
b5 = ct.CTkButton(root, text="Size test", command=lambda:CTkMessagebox.messagebox(title='Custom size example!', text='This looks big!', size='700x500'))
b5.pack(pady=10)
b6 = ct.CTkButton(root, text="Position test", command=lambda:CTkMessagebox.messagebox(title='Position test', text='This looks kinda off!', center=False))
b6.pack(pady=10)
root.mainloop()
main()