Go up one levelGo to Previous Go to Next

ListboxWidget

ListboxWidget is an Itcl widget for scrolled lists, based on the Tk listbox. Methods are available that make it easy to set and get the contents of the listbox.

Example:

 
set w [ListboxWidget .lb \ 
   -title "The Listbox"] 
pack $w -fill x -expand 1
 
$w set_contents { 
    {one   two   three ...} 
    {four  five  six ...} 
    {seven eight nine ...}
}
$w select_row 1 
puts "selected [$w get_selected]" 
puts "internal listbox name is: [$w component listbox]" 
  
bind [$w component listbox] \
<ButtonRelease-1> "puts \[$w get_selected\]"

See ListboxWidget(n) for more details.


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory