class TkProgressframe
Attributes
max[RW]
Public Class Methods
new(parent=nil, _max=100, *args)
click to toggle source
Calls superclass method
TkFloatTitledFrame::new
# File lib/a-tkcommons.rb, line 2045 def initialize(parent=nil, _max=100, *args) super(parent) _max=1 if _max<=0 @max = _max @progress = TkVariable.new @progress.value = -1 Tk::BWidget::ProgressBar.new(self, :width=>150, :height=>10, :background=>'red', :foreground=>'blue', :variable=>@progress, :borderwidth=>0, :relief=>'flat', :maximum=>_max).place('width' => '150','x' => 25,'y' => 30,'height' => 15) @buttons_frame = TkFrame.new(self, Arcadia.style('panel')).pack('fill'=>'x', 'side'=>'bottom') #@b_cancel = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go| @b_cancel = Arcadia.wf.titletoolbutton(@buttons_frame){|_b_go| default 'disabled' text 'Cancel' overrelief 'raised' justify 'center' pack('side'=>'top','ipadx'=>5, 'padx'=>5) } place('x'=>100,'y'=>100,'height'=> 120,'width'=> 200) end
Public Instance Methods
on_cancel=(_proc)
click to toggle source
# File lib/a-tkcommons.rb, line 2081 def on_cancel=(_proc) @b_cancel.bind_append('1', _proc) end
progress(_incr=1)
click to toggle source
# File lib/a-tkcommons.rb, line 2077 def progress(_incr=1) @progress.numeric += _incr end
quit()
click to toggle source
# File lib/a-tkcommons.rb, line 2073 def quit #self.destroy end