summaryrefslogtreecommitdiff
path: root/ext/tk/sample/tkextlib/tktable/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/tkextlib/tktable/command.rb')
-rw-r--r--ext/tk/sample/tkextlib/tktable/command.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/tk/sample/tkextlib/tktable/command.rb b/ext/tk/sample/tkextlib/tktable/command.rb
index bf36159ccc..e697ccf3bf 100644
--- a/ext/tk/sample/tkextlib/tktable/command.rb
+++ b/ext/tk/sample/tkextlib/tktable/command.rb
@@ -27,7 +27,7 @@ current = TkLabel.new(:textvariable=>cur_var, :width=>5)
ent_var = TkVariable.new
entry = TkEntry.new(:textvariable=>ent_var)
-table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
+table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
:command=>[proc{|mode, cell, val|
if (mode == :w)
data[cell] = val
@@ -38,10 +38,10 @@ table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
'' # not exist
end
end
- }, '%i %C %s'],
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>1,
- :roworigin=>-1, :colorigin=>-1,
+ }, '%i %C %s'],
+ :width=>6, :height=>6,
+ :titlerows=>1, :titlecols=>1,
+ :roworigin=>-1, :colorigin=>-1,
:rowstretchmode=>:last, :colstretchmode=>:last,
:rowtagcommand=>proc{|row|
row = Integer(row)
@@ -50,20 +50,20 @@ table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
:coltagcommand=>proc{|col|
col = Integer(col)
(col>0 && col%2 == 1)? 'OddCol': ''
- },
- :selectmode=>:extended, :flashmode=>true,
+ },
+ :selectmode=>:extended, :flashmode=>true,
:rowstretch=>:unset, :colstretch=>:unset,
:browsecommand=>[proc{|w, s|
cur_var.value = s
ent_var.value = w.get(s)
- }, '%W %S'],
- :validate=>true,
- :validatecommand=>proc{|e|
+ }, '%W %S'],
+ :validate=>true,
+ :validatecommand=>proc{|e|
ent_var.value = e.new_value; true
})
=begin
:validatecommand=>[
- proc{|s|
+ proc{|s|
ent_var.value = s; true
}, '%S'])
=end