Gregor Kopp
3/1/2007 8:30:00 AM
Alex DeCaria schrieb:
> Perl/Tk contains a "Scrolled" method which is a shortcut method for
> creating a widget with a scrollbar (Learning Perl/TK, by Walsh, pg. 126)
> without creating a widget and a scrollbar separately. Does Ruby/TK have
> a similar method, or do I have to create the widget and scrollbar
> separately?
>
> Thanks!
>
If it helps, you can use scrollbars this way:
# example how to add scrollbars to items
require 'tk'
root = TkRoot.new
list = TkListbox.new(root, 'selectmode'=>'single')
list.yscrollbar(TkScrollbar.new(root).pack('side'=>'left', 'fill'=>'y'))
Tk.mainloop