# 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
# File tk/lib/tk/scrollable.rb, line 8 def xscrollcommand(cmd=Proc.new) configure_cmd 'xscrollcommand', cmd # Tk.update # avoid scrollbar trouble self end
# 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