rubyでTkListboxを使用するサンプル

rubyコード:
require 'tk’
top = TkRoot.new {title “TKListboxサンプル"}

list1 = TkListbox.new(top)
list1.insert(1," Python")
list1.insert(2," Perl")
list1.insert(3," C")
list1.insert(4," PHP")
list1.insert(5," JSP")
list1.insert(6," Ruby")
list1.pack()
Tk.mainloop

Ruby

Posted by arkgame