wm title . "Scrolledlistbox Example" ## ## Helper procs for example ## proc select {} { puts "Selected Items: [.slb getcurselection]" return }; # end proc select proc dblClick {} { puts "Double Clicked on [.slb getcurselection]" return }; # end proc dblClick ##========================================================= ## Create a scrolledlistbox iwidget ##========================================================= ## iwidgets::scrolledlistbox .slb \ -hscrollmode dynamic \ -selectioncommand select \ -dblclickcommand dblClick \ -scrollmargin 5 \ -labelpos n \ -visibleitems 28x10 \ -textbackground lightblue \ -selectbackground darkgray \ -selectforeground white \ -labeltext Cities: pack .slb .slb insert end Boston Dallas "San Diego" Chicago "New York" Miami Denver Seattle "Los Angeles" .slb insert end "San Francisco" Minneapolis "Oklahoma City" Phoenix .slb justify bottom .slb selection set Seattle