#!/bin/sh
# \
	exec itkwish -f "$0" ${1+"$@"} 

#
# Demo script for the Scrolledlistbox class
#
option add *textBackground white

proc selCmd {} {
    puts stdout "Selection : [.slb getcurselection]"
}

proc defCmd {} {
    puts stdout "Double Click"
    return [selCmd]
}

scrolledlistbox .slb -selectmode single \
	-items {Hello {Out There} World} \
	-vscrollmode static -hscrollmode dynamic -labeltext "List" \
	-labelpos nw -selectioncommand selCmd -dblclickcommand defCmd 

pack .slb -padx 10 -pady 10 -fill both -expand yes

.slb insert 2 {Cruel Cruel} Dirty

.slb insert end Universe

.slb delete "Cruel Cruel"

.slb delete 2 3

