added .configure() to CTkSlider

This commit is contained in:
Tom Schimansky
2021-12-22 10:48:41 +01:00
parent b7fc6f3ad9
commit 9109663848
3 changed files with 75 additions and 2 deletions

View File

@@ -104,6 +104,8 @@ class App(tkinter.Tk):
width=160,
height=16,
border_width=5,
from_=1,
to=0,
number_of_steps=3,
command=self.progressbar.set)
self.slider_1.place(x=20, rely=0.6, anchor=tkinter.W)
@@ -113,6 +115,7 @@ class App(tkinter.Tk):
width=160,
height=16,
border_width=5,
progress_color=("gray65", "gray40"),
command=self.progressbar.set)
self.slider_2.place(x=20, rely=0.7, anchor=tkinter.W)
self.slider_2.set(0.7)

View File

@@ -35,7 +35,7 @@ button_1 = customtkinter.CTkButton(master=frame_1, corner_radius=10, command=but
button_1.place(relx=0.5, rely=0.4, anchor=tkinter.CENTER)
# button_1.configure(state="disabled")
slider_1 = customtkinter.CTkSlider(master=frame_1, command=slider_function, from_=0, to=2, progress_color="gray40")
slider_1 = customtkinter.CTkSlider(master=frame_1, command=slider_function, from_=0, to=1, progress_color=("gray65", "gray40"))
slider_1.place(relx=0.5, rely=0.55, anchor=tkinter.CENTER)
slider_1.set(1.5)