Skip to content

Commit

Permalink
changed tabview test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSchimansky committed Nov 13, 2022
1 parent 3f44877 commit b62543f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions examples/complex_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def __init__(self):
# configure window
self.title("CustomTkinter complex_example.py")
self.geometry(f"{1100}x{580}")
#self.resizable(False, False)

# configure grid layout (4x4)
self.grid_columnconfigure(1, weight=1)
Expand Down Expand Up @@ -48,7 +47,7 @@ def __init__(self):
self.entry = customtkinter.CTkEntry(self, placeholder_text="CTkEntry")
self.entry.grid(row=3, column=1, columnspan=2, padx=(20, 0), pady=(20, 20), sticky="nsew")

self.main_button_1 = customtkinter.CTkButton(master=self, fg_color="transparent", border_width=2)
self.main_button_1 = customtkinter.CTkButton(master=self, fg_color="transparent", border_width=2, text_color=("gray10", "#DCE4EE"))
self.main_button_1.grid(row=3, column=3, padx=(20, 20), pady=(20, 20), sticky="nsew")

# create textbox
Expand Down Expand Up @@ -139,7 +138,7 @@ def __init__(self):
self.seg_button_1.set("Value 2")

def open_input_dialog(self):
dialog = customtkinter.CTkInputDialog(text="Type in a number:"*50, title="CTkInputDialog")
dialog = customtkinter.CTkInputDialog(text="Type in a number:", title="CTkInputDialog")
print("CTkInputDialog:", dialog.get_input())

def change_appearance_mode(self, new_appearance_mode: str):
Expand Down
8 changes: 6 additions & 2 deletions test/manual_integration_tests/test_tabview.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import customtkinter

app = customtkinter.CTk()
app.geometry("800x900")

tabview_1 = customtkinter.CTkTabview(app)
tabview_1.pack(padx=20, pady=20)
Expand All @@ -18,13 +19,16 @@

tabview_1.move(0, "tab 2")

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.configure(state="normal")
# tabview_1.delete("tab 1")

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)

app.mainloop()

0 comments on commit b62543f

Please sign in to comment.