finished basic tabview mechanics

This commit is contained in:
Tom Schimansky
2022-10-14 01:15:35 +02:00
parent 7abdf21021
commit 6ba384eb0b
4 changed files with 122 additions and 34 deletions

View File

@ -2,13 +2,26 @@ import customtkinter
app = customtkinter.CTk()
tabview_1 = customtkinter._CTkTabview(app)
tabview_1 = customtkinter._CTkTabview(app, state="disabled")
tabview_1.pack(padx=20, pady=20)
tabview_1.add("tab 1")
tabview_1.insert(0, "tab 0 g |ß$§ 😀")
app.update()
tab_1 = tabview_1.add("tab 2")
tabview_1.insert(0, "tab 1")
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")
#b1 = customtkinter.CTkButton(master=tab_1, text="button tab 1")
#b1.pack(pady=20)
b2 = customtkinter.CTkButton(master=tabview_1.tab("tab 2"), text="button tab 2")
b2.pack()
tabview_1.tab("tab 2").configure(fg_color="red")
# tabview_1.delete("tab 1")
tabview_1._segmented_button._buttons_dict["tab 0 g |ß$§ 😀"]._text_label.configure(padx=0, pady=0, bd=1)
tabview_1._segmented_button._buttons_dict["tab 0 g |ß$§ 😀"]._text_label.configure(bg="red")
app.mainloop()