Aug-31-2023, 02:50 AM
(This post was last modified: Aug-31-2023, 02:50 AM by deanhystad.)
Read the documentation. Tots of examples. Light on text. CTkComboBox does not have a "current()" method for setting the value. Use .set().
https://customtkinter.tomschimansky.com/...s/combobox
https://customtkinter.tomschimansky.com/...s/combobox
import customtkinter as tk with open(__file__, "r") as file: values = [x.strip() for x in file] root = tk.CTk() cbox = tk.CTkComboBox(root, values=values, font=(None, 16), width=600) cbox.pack() cbox.set(values[5]) root.mainloop()Are you happy now? You made me install customtkinter.