[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby/TK equivalent to Perl/TK "Scrolled" method

Alex DeCaria

2/28/2007 8:14:00 PM

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!

--
Posted via http://www.ruby-....

1 Answer

Gregor Kopp

3/1/2007 8:30:00 AM

0

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