2022-10-06 16:53:52 +03:00
|
|
|
import customtkinter
|
|
|
|
|
|
|
|
app = customtkinter.CTk()
|
2022-11-13 19:10:04 +03:00
|
|
|
app.geometry("800x900")
|
2022-10-06 16:53:52 +03:00
|
|
|
|
2022-11-01 02:37:30 +03:00
|
|
|
tabview_1 = customtkinter.CTkTabview(app)
|
2022-10-10 01:48:08 +03:00
|
|
|
tabview_1.pack(padx=20, pady=20)
|
2022-10-06 16:53:52 +03:00
|
|
|
|
2022-10-14 20:58:16 +03:00
|
|
|
tab_1 = tabview_1.add("tab 1")
|
|
|
|
tabview_1.insert(0, "tab 2")
|
2022-10-14 02:15:35 +03:00
|
|
|
|
|
|
|
tabview_1.add("tab 42")
|
|
|
|
tabview_1.set("tab 42")
|
|
|
|
tabview_1.delete("tab 42")
|
|
|
|
tabview_1.insert(0, "tab 42")
|
|
|
|
tabview_1.delete("tab 42")
|
|
|
|
tabview_1.insert(1, "tab 42")
|
|
|
|
tabview_1.delete("tab 42")
|
|
|
|
|
2022-10-15 14:58:51 +03:00
|
|
|
tabview_1.move(0, "tab 2")
|
2022-10-14 20:58:16 +03:00
|
|
|
|
2022-10-14 02:15:35 +03:00
|
|
|
b2 = customtkinter.CTkButton(master=tabview_1.tab("tab 2"), text="button tab 2")
|
|
|
|
b2.pack()
|
|
|
|
|
2022-10-21 22:28:31 +03:00
|
|
|
# tabview_1.tab("tab 2").configure(fg_color="red")
|
2022-10-14 20:58:16 +03:00
|
|
|
tabview_1.configure(state="normal")
|
2022-10-14 02:15:35 +03:00
|
|
|
# tabview_1.delete("tab 1")
|
2022-10-06 16:53:52 +03:00
|
|
|
|
2022-11-13 19:10:04 +03:00
|
|
|
for i in range(10):
|
|
|
|
for j in range(30):
|
|
|
|
button = customtkinter.CTkButton(tabview_1.tab("tab 1"), height=10, width=30, font=customtkinter.CTkFont(size=8))
|
|
|
|
button.grid(row=j, column=i, padx=2, pady=2)
|
|
|
|
|
2022-10-06 16:53:52 +03:00
|
|
|
app.mainloop()
|