diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
| commit | bbe91bcd1898d544739e41fdf91aa8288526540a (patch) | |
| tree | d280d8542cc44d1cd1a75e8ec87b1f9d231561b7 /ext/tk/sample/tkextlib/tktable/dynarows.rb | |
| parent | 28c7b64f14c02a953ba051acd144e4ee5144450e (diff) | |
* ext/tk/lib/tk/*: untabify
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkextlib/tktable/dynarows.rb')
| -rw-r--r-- | ext/tk/sample/tkextlib/tktable/dynarows.rb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/tk/sample/tkextlib/tktable/dynarows.rb b/ext/tk/sample/tkextlib/tktable/dynarows.rb index 35359046f..d083e2655 100644 --- a/ext/tk/sample/tkextlib/tktable/dynarows.rb +++ b/ext/tk/sample/tkextlib/tktable/dynarows.rb @@ -25,21 +25,21 @@ def table_validate(w, idx) time = Tk.tk_call('clock', 'scan', val) date = [] Tk.tk_call('clock', 'format', time, - :format=>'%m %d %Y').split(' ').each{|item| + :format=>'%m %d %Y').split(' ').each{|item| date << item.sub(/^\s*0*/,'') } w.set(idx, date.join('/')) if row == nrows - 1 if w.get([row,1]) != '' && w.get([row,2]) != '' - w.tag_row_reset(row) - w.set([row,0], row) - nrows += 1 - row += 1 - w.configure(:rows=>nrows) - w.tag_row('unset', row) - w.set([row,0], '*') - w.see([row,1]) - w.activate([row,1]) + w.tag_row_reset(row) + w.set([row,0], row) + nrows += 1 + row += 1 + w.configure(:rows=>nrows) + w.tag_row('unset', row) + w.set([row,0], '*') + w.see([row,1]) + w.activate([row,1]) end end rescue @@ -55,13 +55,13 @@ end lbl = TkLabel.new(:text=>"Dynamic Date Validated Rows") table = Tk::TkTable.new(:rows=>2, :cols=>3, :cache=>1, :selecttype=>:row, - :titlerows=>1, :titlecols=>1, :height=>5, - :colstretch=>:unset, :rowstretch=>:unset, - :autoclear=>true, - :browsecommand=>[ - proc{|w,s| table_validate(w, s)}, - '%W %s' - ]) + :titlerows=>1, :titlecols=>1, :height=>5, + :colstretch=>:unset, :rowstretch=>:unset, + :autoclear=>true, + :browsecommand=>[ + proc{|w,s| table_validate(w, s)}, + '%W %s' + ]) table.set([0,1], 'Begin', [0,2], 'End', [1,0], '*') table.tag_configure('unset', :fg=>'#008811') table.tag_configure('title', :fg=>'red') |
