TOP > tips > python-tkinter > bind.shtml widget (ウィジェット) のパーツとアクションを両方定義すると、まともな Windows アプリケーションになります。 "Touch me" をクリックする度にメッセージが変化するスクリプト。 C:\> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> python # -*- coding: Shift_JIS -*- import sys, Tkinter def b1Press(ev): """ マウスボタン 1 が押された時に実行したい処理 """ l.config(text = "Button 1 press") def b1Release(ev): """ マウスボタン 1

