[[Tkinter]]
 
 *Radiobutton [#d6e10f67]
 #ref(radiobutton.py)
 
 **変数を用意する [#tc384db8]
  self.var = IntVar()
 
 **変数を初期化する。 [#w6aa7ef2]
  self.var.set(3)
 
 **ボタンを用意する。 [#w4b353bf]
  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()で値を得る。 [#r3f3d2f2]
  v=self.var.get()
 

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS