Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

In Files

  • tk/lib/tk/scrollable.rb

Class/Module Index [+]

Quicksearch

Tk::X_Scrollable

Public Instance Methods

xscrollbar(bar=nil) click to toggle source
 
               # File tk/lib/tk/scrollable.rb, line 29
def xscrollbar(bar=nil)
  if bar
    @xscrollbar = bar
    @xscrollbar.orient 'horizontal'
    self.xscrollcommand {|*arg| @xscrollbar.set(*arg)}
    @xscrollbar.command {|*arg| self.xview(*arg)}
    Tk.update  # avoid scrollbar trouble
  end
  @xscrollbar
end
            
xscrollcommand(cmd=Proc.new) click to toggle source
 
               # File tk/lib/tk/scrollable.rb, line 8
def xscrollcommand(cmd=Proc.new)
  configure_cmd 'xscrollcommand', cmd
  # Tk.update  # avoid scrollbar trouble
  self
end
            
xview(*index) click to toggle source
 
               # File tk/lib/tk/scrollable.rb, line 14
def xview(*index)
  if index.size == 0
    list(tk_send_without_enc('xview'))
  else
    tk_send_without_enc('xview', *index)
    self
  end
end
            
xview_moveto(*index) click to toggle source
 
               # File tk/lib/tk/scrollable.rb, line 22
def xview_moveto(*index)
  xview('moveto', *index)
end
            
xview_scroll(*index) click to toggle source
 
               # File tk/lib/tk/scrollable.rb, line 25
def xview_scroll(*index)
  xview('scroll', *index)
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.