# File tk/lib/tkextlib/tcllib/autoscroll.rb, line 65
def autoscroll(mode = nil)
case mode
when :x, 'x'
if @xscrollbar
Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar)
end
when :y, 'y'
if @yscrollbar
Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar)
end
when nil, :both, 'both'
if @xscrollbar
Tk::Tcllib::Autoscroll.autoscroll(@xscrollbar)
end
if @yscrollbar
Tk::Tcllib::Autoscroll.autoscroll(@yscrollbar)
end
else
fail ArgumentError, "'x', 'y' or 'both' (String or Symbol) is expected"
end
self
end
# File tk/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
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.