diff options
| author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-02 11:49:46 +0000 |
|---|---|---|
| committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-02 11:49:46 +0000 |
| commit | 851a9c31e8e74cc5cfeef4aceab6b56cefadd973 (patch) | |
| tree | 217e8b830901ceec619b986fc46966acc71ed84a /ext/tk/sample | |
| parent | 582580e35d01f9704f518281ef5e3a010eb6d9a3 (diff) | |
| download | ruby-851a9c31e8e74cc5cfeef4aceab6b56cefadd973.tar.gz ruby-851a9c31e8e74cc5cfeef4aceab6b56cefadd973.tar.xz ruby-851a9c31e8e74cc5cfeef4aceab6b56cefadd973.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@8889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
| -rw-r--r-- | ext/tk/sample/tkextlib/tile/demo.rb | 8 |
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 7c58704c5..f04ba10c6 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} |
