The following is the code:
The import tkinter as tk
The from tkinter import TTK
Def go (self) :
Global sp
Sp=tk. Spinbox (root, from_=1, the to=int (combo. The get ()))
Root=tk. Tk ()
Combo=ttk.Com bobox (root)
Combo [' value ']=(' 10 ', '20')
Combo. Bind (" & lt;
Combo. The grid ()
Sp=tk. Spinbox (root, from_=1, the to=99)
Sp. The grid ()
CodePudding user response:
First after the last row and root. The mainloop ()Then go functions as follows:
Def go (self) :
Sp. Config (to=int (combo. The get ()))