Hi all,
I create a 2-D checkbuttons in the root window using grid.
How do I get the information of a specific widget, let say the widget
located at row=0, column=0, after I press either one of the widget?
Thanks,
#########################
rows is an array of array
@chk_bts=[]# contain all checkbuttons in the interface one
row=0
column=0
count=0
rows.each do |r|
r.each do |e|
@chk_bts<<TkCheckbutton.new(@root) do
text e
if count==0
font TkFont.new(‘times 14 bold’)
else
font TkFont.new(‘times 11 bold’)
end
grid(:row=>row,:column=>column)
anchor 'nw'
width 15
wrap 150
relief "raised"
justify 'left'
activeforeground 'red'
end
count+=1
column+=1
end
count=0 #reset counter
column=0 #reset the column
row+=1
end
@chk_bts.each do |c_bt|
c_bt.command{
# how to get the info about widget at 0,0 position in the grid
# after I press either of the checkbutton?
}
end