Module Tk::Scrollable
In: tk/lib/tkextlib/tcllib/autoscroll.rb
tk/lib/tk/scrollable.rb

Methods

Included Modules

XScrollable YScrollable

Public Instance methods

[Source]

# File tk/lib/tkextlib/tcllib/autoscroll.rb, line 64
    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

[Source]

# File tk/lib/tkextlib/tcllib/autoscroll.rb, line 86
    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

[Validate]

ruby-doc.org is a community service provided by Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.