How can a TkScrollbar be scrolled with code?
Neither .scroll nor .autoscroll are recognised.
test = TkScrollbar.new(root).pack('side'=>'right', 'fill'=>'y')
test.scroll(1)
test.autoscroll
Edit: Forgot the link to the doc: http://ruby-doc.org/stdlib/libdoc/tk/rdoc/classes/Tk/Scrollbar.html
I have no experience with ruby and tk, but with other tk bindings (python and tcl, to be precise), when you want to scroll something programmatically you don’t move the scrollbar, you directly scroll whatever it is you want scrolled. The scrollbar will update itself to reflect the changes.
You scroll an object by using its
xviewandyviewmethods. I assume (but don’t know for a fact) those are exposed in the ruby bindings.