From: j_kuro@... (Jun Kuroda) Date: 1996-09-23T23:41:12+09:00 Subject: [ruby-list:559] Re: [ruby/tk] Radiobutton sample 黒田です. >Radiobutton の使い方が分かりません。 > >#!/usr/local/X11R6/bin/wish -f >radiobutton .left -text left -anchor w >radiobutton .center -text center -anchor w >radiobutton .right -text right -anchor w >pack .left .center .right -side top -fill x > >例えばこれ↑と同じものを Ruby で書くには >どのように書いたらいいのでしょうか? ぜんぜん理解してない人が, 同じものがでるように書いてみました. - -- #!/usr/local/bin/ruby require "tk" #root = TkFrame.new { #} left = TkRadioButton.new { text 'left' anchor 'w' pack('side'=>'top', 'fill'=>'x') } center = TkRadioButton.new { text 'center' anchor 'w' pack('side'=>'top', 'fill'=>'x') } right = TkRadioButton.new { text 'right' anchor 'w' pack('side'=>'top', 'fill'=>'x') } Tk.mainloop - -- 元のtcl版は, window が出てきた時, left の button の色が白いの ですがうち(tcl7.[45]/tk4.[01])だけですか? - -- 黒田 淳 (Kuroda Jun)