# File tst/tst_locana.rb, line 520
def tst_listbox()
   Lwindow.new(:TestListBox, :pos=>[60, 60], :text=>'Test ListBoxes') {
      listbox(:l_list1, :after=>:prev, :padx=>10, :pady=>10)
      listbox(:l_list2, :after=>:prev, :padx=>10, :pady=>10, :height=>80, :value=>[6], :vscroll=>:on, :otype=>:extended)
      listbox(:l_list3, :after=>:prev, :padx=>10, :pady=>10, :width=>60, :height=>80, :value=>[2,4], :otype=>:multiple)
      colors = COLOR_NAMES.get_keys_as_strings.sort
      listbox(:l_list4, :after=>:prev, :padx=>10, :pady=>10, :height=>100, :text=>colors)
      button(:b_ok, :sticky=>:se, :padx=>10, :pady=>10, :text => '&Ok')
      l_list1.text = ['item 1', 'item 2', 'item 3', 'long item 4', 'i 5', 'item 6', 'item 7']
      l_list2.text = l_list1.text
      l_list3.text = l_list1.text
      l_list1.on_after_update = %{print "after update of list 1, new value: #{event[:value].inspect}\n"}
      l_list2.on_after_update = %{print "after update of list 2, new value: #{event[:value].inspect}\n"}
      l_list3.on_after_update = %{print "after update of list 3, new value: #{event[:value].inspect}\n"}
      l_list4.on_after_update = %{print "after update of list 4, new value: #{event[:value].inspect}\n"}
      b_ok.on_click = "close()"      # this button will close the form

      self.on_open = %{l_list1.select(5)}
   }
end