Tkinter

Radiobutton

変数を用意する

self.var = IntVar()

変数を初期化する。

self.var.set(3)

ボタンを用意する。

r1 = Radiobutton(text="radio1",variable=self.var,value=1)
r2 = Radiobutton(text="radio2",variable=self.var,value=2)
r3 = Radiobutton(text="radio3",variable=self.var,value=3)

get()で値を得る。

v=self.var.get()

添付ファイル: fileradiobutton.py 488件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2006-08-27 (日) 07:48:37 (6445d)