test_vertical_widgets.py 1003 B

12345678910111213141516171819202122232425
  1. import customtkinter
  2. app = customtkinter.CTk() # create CTk window like you do with the Tk window (you can also use normal tkinter.Tk window)
  3. app.geometry("400x650")
  4. app.title("test_vertical_widgets")
  5. app.grid_columnconfigure(0, weight=1)
  6. app.grid_rowconfigure((0, 1, 2, 3), weight=1)
  7. progressbar_1 = customtkinter.CTkProgressBar(app, orientation="horizontal")
  8. progressbar_1.grid(row=0, column=0, pady=20, padx=20)
  9. progressbar_2 = customtkinter.CTkProgressBar(app, orientation="vertical")
  10. progressbar_2.grid(row=1, column=0, pady=20, padx=20)
  11. slider_1 = customtkinter.CTkSlider(app, orientation="horizontal", command=progressbar_1.set,
  12. button_corner_radius=3, button_length=20)
  13. slider_1.grid(row=2, column=0, pady=20, padx=20)
  14. slider_2 = customtkinter.CTkSlider(app, orientation="vertical", command=progressbar_2.set,
  15. button_corner_radius=3, button_length=20)
  16. slider_2.grid(row=3, column=0, pady=20, padx=20)
  17. app.mainloop()