0
私はComboxを使ってTkinterに ボタンを押して変数を出力しようとしていますが、先に進まないでください。戻り値変数付きのPythonコンボボックス
from tkinter import *
import tkinter as tk
from tkinter import ttk
def select():
name_option = var.get()
print (Number of choices)
root = tk.Tk()
var = StringVar(root)
choices = {
'A': '11',
'B': '22',
'C': '33',
'D': '44',
'E': '55',
}
option = tk.OptionMenu(root, var, *choices)
option.place(x = 1, y = 50, width=80, height=25)
change_button = tk.Button(root, text="Klick me", command=select)
change_button.place(x = 100, y = 50, width=80, height=25)
root.mainloop()