tkinterについてのメモ
tkinter
とりあえず動かす
ボタンが1つついているアプリが起動する
import tkinter root = tkinter.Tk() root.geometry("300x200") # サイズの指定 root.title("test") # タイトルの設定 label = tkinter.Label(text="not clicked") label.place(x=30, y=70) # ボタンがクリックされた処理 def button_clicked(): label["text"] = "clicked!" # ボタンの作成(add) button = tkinter.Button(root, text="btn", command=button_clicked) button.place(x=100, y=170) root.mainloop()