class TkFrameProgress
Attributes
max[RW]
Public Class Methods
new(parent=nil, _max=100, *args)
click to toggle source
Calls superclass method
# File lib/a-tkcommons.rb, line 2088 def initialize(parent=nil, _max=100, *args) super(parent, Arcadia.style('panel').update({:background => Arcadia.conf('titlelabel.background')}), *args) _max=1 if _max<=0 @max = _max @progress = TkVariable.new @progress.value = -1 Tk::BWidget::ProgressBar.new(self, :width=>50, :height=>16, :background=>Arcadia.conf('titlelabel.background'), :troughcolor=>Arcadia.conf('titlelabel.background'), :foreground=>Arcadia.conf('progress.foreground'), :variable=>@progress, :borderwidth=>0, :relief=>'flat', :maximum=>_max).pack('side'=>'left','padx'=>0, 'pady'=>0) #@b_cancel = TkButton.new(self, Arcadia.style('toolbarbutton')){|b| @b_cancel = Arcadia.wf.titletoolbutton(self){|b| # background Arcadia.conf('titlelabel.background') # foreground Arcadia.conf('titlelabel.background') # highlightbackground Arcadia.conf('titlelabel.background') # highlightcolor Arcadia.conf('titlelabel.background') image Arcadia.image_res(CLOSE_FRAME_GIF) # borderwidth 0 # relief 'flat' # padx 0 # pady 0 # anchor 'n' pack('side'=>'left','padx'=>0, 'pady'=>0) } end
Public Instance Methods
destroy()
click to toggle source
Calls superclass method
# File lib/a-tkcommons.rb, line 2118 def destroy @on_destroy.call if defined?(@on_destroy) super end
on_cancel=(_proc)
click to toggle source
# File lib/a-tkcommons.rb, line 2127 def on_cancel=(_proc) @b_cancel.bind_append('1', _proc) end
on_destroy=(_proc)
click to toggle source
# File lib/a-tkcommons.rb, line 2131 def on_destroy=(_proc) @on_destroy=_proc end
progress(_incr=1)
click to toggle source
# File lib/a-tkcommons.rb, line 2123 def progress(_incr=1) @progress.numeric += _incr end