ich wollte gerad mit Tkinter einen Code schreiben, wo eine Combobox auf eine andere reagiert. Ich geb hier mal einen Beispielcode:
Code: Alles auswählen
from Tkinter import *
import ttk
root = Tk()
list = ['Mathe', 'Deutsch']
dict = {'Mathe': [0, 4, 7], 'Deutsch': [4, 3, 2], '': ''}
Fach = StringVar()
Note = IntVar()
ttk.Combobox(root, value = list, textvariable = Fach).grid(row = 1, column = 1)
ttk.Combobox(root, value = dict[Fach.get()], textvariable = Note).grid(row = 1, column = 2)
root.mainloop()