summaryrefslogtreecommitdiff
path: root/ext/tk/sample
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-02 11:49:46 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-02 11:49:46 +0000
commitea72d0391b024567ab97b145691fbe7bb9f1cb29 (patch)
tree21816228cb97dbfdcf695559eb525ef1ffb264ae /ext/tk/sample
parente91b4b801e346eb3e33663f21bdc6199566282b8 (diff)
* ext/tk/lib/tkextlib/tile/tprogressbar.rb: Tk::Tile::TProgressbar#start
takes optional argument `interval'. * ext/tk/sample/tkextlib/tile/demo.rb: emulate Tk::Tile::TProgressbar with Tk::Tile::TProgress in tile 0.4. (repeating buttons demo) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
-rw-r--r--ext/tk/sample/tkextlib/tile/demo.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/sample/tkextlib/tile/demo.rb b/ext/tk/sample/tkextlib/tile/demo.rb
index 7c58704c56..f04ba10c65 100644
--- a/ext/tk/sample/tkextlib/tile/demo.rb
+++ b/ext/tk/sample/tkextlib/tile/demo.rb
@@ -822,11 +822,11 @@ def repeatDemo
begin
p = Tk::Tile::TProgressbar.new(f, :orient=>:horizontal, :maximum=>10)
rescue # progressbar is not supported (tile 0.4)
- p = Tk::Tile::TLabel.new(f, :text=>0)
+ p = Tk::Tile::TProgress.new(f, :orient=>:horizontal, :from=>0, :to=>10)
def p.step
- i = self.text.to_i + 1
- i = 0 if i >= 10
- self.text(i.to_s)
+ i = self.get + 1
+ i = self.from if i > self.to
+ self.set(i)
end
end
b.command {p.step}