Method: Tk::Scrollable#unautoscroll

Defined in:
lib/tkextlib/tcllib/autoscroll.rb

#unautoscroll(mode = nil) ⇒ Object



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/tkextlib/tcllib/autoscroll.rb', line 87

def unautoscroll(mode = nil)
  case mode
  when :x, 'x'
    if @xscrollbar
      Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar)
    end
  when :y, 'y'
    if @yscrollbar
      Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar)
    end
  when nil, :both, 'both'
    if @xscrollbar
      Tk::Tcllib::Autoscroll.unautoscroll(@xscrollbar)
    end
    if @yscrollbar
      Tk::Tcllib::Autoscroll.unautoscroll(@yscrollbar)
    end
  else
    fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected"
  end
  self
end