Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby/TK equivalent to Perl/TK "Scrolled" method

Reply
Thread Tools

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

 
 
Alex DeCaria
Guest
Posts: n/a
 
      02-28-2007
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-forum.com/.

 
Reply With Quote
 
 
 
 
Gregor Kopp
Guest
Posts: n/a
 
      03-01-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Equivalent of Javascript Alert(string) method in C# script. Erik Veldkamp ASP .Net 2 06-18-2010 01:51 PM
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
MapPath equivalent from static method Martin Eyles ASP .Net 4 04-04-2006 11:15 AM
equivalent for awt paint method in swing? Jochen Opp Java 2 09-25-2003 01:19 PM
equivalent for awt paint method in swing? Jochen Opp Java 0 09-24-2003 02:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57