1

Hi have this small code for practice using CustomTkinter, reading the official documentation for a vertical slider i need to write orientation = 'vertical' but when i run the code Py charm says "_tkinter.TclError: unknown option "-orientation", how is possible that orientation isn't a parameter? I can't understand please help me, the code:

from tkinter import *
import customtkinter
def slider(valore):
    valore = round(valore,1)
    print(valore)
win = Tk()
slider = customtkinter.CTkSlider(master=win, from_=0, to=100, command=slider,fg_color='#555555',progress_color='#144870')
slider.configure(orientation='vertical')
slider.pack(padx=100,pady=100)
win.mainloop()

1 Answer 1

1

Comment out line 8. Add this parameter orient=Tk.Vertical.

slider = customtkinter.CTkSlider(master=win, from_=0, to=100,orient=Tk.Vertical, command=slider,fg_color='#555555',progress_color='#144870')
Sign up to request clarification or add additional context in comments.

1 Comment

Hi, thanks i upvoted and marked your answer as correct thanks, i figured out that even orient = 'vertical' works, maybe it's the word orientation that is't recognized, the official documentation on GitHub says orientation,thanks again github.com/TomSchimansky/CustomTkinter/wiki/CTkSlider

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.