Как поставить default value в Combobox tkinter Python?
Хочу, чтобы было изначально выбрано значение "Неделя", а получается, что там пустое поле
choiceVar = StringVar()
choices = ("Месяц", "Неделя")
choiceVar.set(choices[1])
self.cb = ttk.Combobox(self.root, textvariable=choiceVar, values=choices, width=10, state='readonly', exportselection=0)
self.cb.place(x=740, y=30)
Ответы (1 шт):
Автор решения: user394830
→ Ссылка
self.cb = ttk.Combobox(self.root, values=("Месяц", "Неделя"))
self.cb.current(1)

