Możesz np. bind-ować dynamicznie list-y ze słownika (dictionary)
przykład
import tkinter as tk
from tkinter import ttk
class Win(tk.Tk):
brand_dic = {
'Audi': ['100', '200', 'A1', 'A6 Allroad'],
'Ford': ['B-MAX', 'Bronco', 'EcoSport', 'Fiesta', 'Galaxy'],
'Honda': ['Accord', 'Civic', 'Jazz', 'Logo'],
'Skoda': ['Fabia', 'Octavia']
}
def __init__(self):
super().__init__()
top = tk.Frame(self)
top.pack(side='top')
self.brand_cmb = ttk.Combobox(top, values=list(Win.brand_dic.keys()))
self.model_cmb = ttk.Combobox(top)
self.brand_cmb.pack(side='left')
self.model_cmb.pack(side='left')
self.brand_cmb.set('Wybierz markę') # self.brand_cmb.current(0)
self.brand_cmb.bind('<<ComboboxSelected>>', self.config_model_cmb)
def config_model_cmb(self, _=None):
self.model_cmb.config(values=Win.brand_dic[self.brand_cmb.get()])
if __name__ == '__main__':
Win().mainloop()