write a complete code to insert a list box in a window: : TkListbox « Tk « Ruby






write a complete code to insert a list box in a window:


require 'tk'
top = TkRoot.new {title "Label and Entry Widget"}

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

 








Related examples in the same category