From: dperkins@... Date: 2006-02-23T23:19:18+09:00 Subject: Re: Ruby/Tk : Accessing a Checkbox > How can I find out whether a Checkbox is checked or unchecked in Ruby? > > Here is my Checkbox definition (hope it is correct): > > $bpmto_check=TkCheckButton.new(bpmto_frame); > > How can I find the state of the checkbox? I tried the .value > member (like in the entry field), but this is not defined > for checkboxes. > > I have searched several tutorials on Ruby/Tk, but did not find > one which covers checkboxes. Is there a reference manual > available, or man pages, which covers the Tk extensions of Ruby? > > Ronald You need a TkVariable associated with the checkbutton. var = TkVariable.new $pbmto_check = TkCheckButton.new(pbmto_frame) do variable var pack end