diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-01 16:09:54 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-05-01 16:09:54 +0000 |
commit | 4c4631c2daaf7b2418c1f0e39292c8ee27a64813 (patch) | |
tree | dfeb96c4772df8caba4e01e749c8f3e1262f8fe0 /ext/tk/sample/tktextframe.rb | |
parent | ce23680755e4e9ab0eed9dc6adb091ef7f1c58cb (diff) | |
download | ruby-4c4631c2daaf7b2418c1f0e39292c8ee27a64813.tar.gz |
* renewal Ruby/Tk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tktextframe.rb')
-rw-r--r-- | ext/tk/sample/tktextframe.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/sample/tktextframe.rb b/ext/tk/sample/tktextframe.rb index 78efdf0970..5d16f2b0be 100644 --- a/ext/tk/sample/tktextframe.rb +++ b/ext/tk/sample/tktextframe.rb @@ -65,9 +65,9 @@ class TkTextFrame < TkText # vertical scrollbar : ON/OFF def vscroll(mode) st = TkGrid.info(@v_scroll) - if mode && st == [] then + if mode && st.size == 0 then @v_scroll.grid('row'=>0, 'column'=>1, 'sticky'=>'ns') - elsif !mode && st != [] then + elsif !mode && st.size != 0 then @v_scroll.ungrid end self @@ -76,10 +76,10 @@ class TkTextFrame < TkText # horizontal scrollbar : ON/OFF def hscroll(mode, wrap_mode="char") st = TkGrid.info(@h_scroll) - if mode && st == [] then + if mode && st.size == 0 then @h_scroll.grid('row'=>1, 'column'=>0, 'sticky'=>'ew') wrap 'none' # => self.wrap('none') - elsif !mode && st != [] then + elsif !mode && st.size != 0 then @h_scroll.ungrid wrap wrap_mode # => self.wrap(wrap_mode) end |