mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
added focus wrapper functions to all widgets
This commit is contained in:
@@ -10,7 +10,7 @@ app = customtkinter.CTk()
|
||||
app.title("test_scrollbar.py")
|
||||
app.geometry("800x1200")
|
||||
app.grid_rowconfigure(0, weight=1)
|
||||
app.grid_columnconfigure((0, 1, 2, 3), weight=1)
|
||||
app.grid_columnconfigure((0, 1, 2, 3, 4), weight=1)
|
||||
|
||||
textbox_1 = customtkinter.CTkTextbox(app, fg_color=None, corner_radius=0, border_spacing=0)
|
||||
textbox_1.grid(row=0, column=0, sticky="nsew")
|
||||
@@ -34,6 +34,7 @@ textbox_2.grid(row=2, column=0, sticky="nsew", padx=20, pady=20)
|
||||
textbox_2.insert("0.0", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\n\n" * 20)
|
||||
|
||||
textbox_2 = customtkinter.CTkTextbox(frame_1, wrap="none", corner_radius=60, border_width=15)
|
||||
#fg_color="blue", scrollbar_color="yellow", text_color="red")
|
||||
textbox_2.grid(row=3, column=0, sticky="nsew", padx=20, pady=20)
|
||||
textbox_2.insert("0.0", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\n\n" * 20)
|
||||
|
||||
@@ -91,5 +92,12 @@ textbox_3 = customtkinter.CTkTextbox(frame_3, corner_radius=0, border_width=0, a
|
||||
textbox_3.grid(row=4, column=0, sticky="nsew", padx=20, pady=20)
|
||||
textbox_3.insert("0.0", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\n\n" * 20)
|
||||
|
||||
textbox_4 = customtkinter.CTkTextbox(app, fg_color=None, corner_radius=0)
|
||||
textbox_4.grid(row=0, column=4, sticky="nsew")
|
||||
textbox_4.insert("0.0", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\n\n" * 20)
|
||||
scrollbar4 = customtkinter.CTkScrollbar(app, command=textbox_4.yview)
|
||||
scrollbar4.grid(row=0, column=5, sticky="nsew")
|
||||
textbox_4.configure(yscrollcommand=scrollbar4.set)
|
||||
|
||||
app.after(3000, lambda: customtkinter.set_appearance_mode("light"))
|
||||
app.mainloop()
|
||||
|
||||
Reference in New Issue
Block a user