listbox


Tcl/Tk


#!/usr/local/bin/wish4.2

listbox .list -width 20 -height 10 -setgrid 1
pack .list -fill x

.list insert 0 yellow gray green blue red black white

ruby/Tk


#!/usr/local/bin/ruby

require "tk"

list = TkListbox.new {
  width 20
  height 10
  setgrid 1
  pack('fill' => 'x')
}
list.insert 0, "yellow", "gray", "green",
  "blue", "red", "black", "white"

Tk.mainloop