1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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/trunk@8889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-08-02 11:49:46 +00:00
parent 909e63ac3c
commit a26cec27e1
3 changed files with 14 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2005-08-01 ocean <ocean@ruby-lang.org>
* lib/tkextlib/tile/tprogressbar.rb: Tk::Tile::TProgressbar#start
takes optional argument `interval'.
* sample/tkextlib/tile/demo.rb: emulate Tk::Tile::TProgressbar
with Tk::Tile::TProgress in tile 0.4. (repeating buttons demo)
2005-08-01 ocean <ocean@ruby-lang.org>
* sample/tkextlib/tile/demo.rb: added repeating buttons demo.

View file

@ -34,8 +34,8 @@ class Tk::Tile::TProgressbar
tk_send_without_enc('step', amount)
end
def start
tk_call_without_enc('::tile::progressbar::start', @path)
def start(interval=None)
tk_call_without_enc('::tile::progressbar::start', @path, interval)
end
def stop

View file

@ -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}