| Itcl  | Itk  | Itcl @ Wiki  | Itcl @ SF  | Tcl  | Tcl @ Wiki |
  home || iwidgets || man pages cross ref distribution docs faq  
buttonbox
calendar
canvasprintbox
canvasprintdialog
checkbox
combobox
dateentry
datefield
dialog
dialogshell
disjointlistbox
entryfield
extbutton
extfileselectionbox
extfileselectiondialog
feedback
fileselectionbox
fileselectiondialog
finddialog
hierarchy
hyperhelp
labeledframe
labeledwidget
mainwindow
menubar
messagebox
messagedialog
notebook
optionmenu
panedwindow
promptdialog
pushbutton
radiobox
regexpfield
scrolledcanvas
scrolledframe
scrolledhtml
scrolledlistbox
scrolledtext
scrolledwidget
selectionbox
selectiondialog
shell
spindate
spinint
spinner
spintime
tabnotebook
tabset
timeentry
timefield
toolbar
watch

man page | options | methods

Scrolledlistbox

The scrolledlistbox iwidget extends the standard Tk listbox widget with predefined vertical and horizontal scrollbars and an associated label. The set of options available has also been amended to include options which allow specification of the list items. All the usual methods exist, plus new ones for sorting the list contents and a short cut version to acquire the current selection. For further information, see the Scrolledlistbox manpage

Components: horizsb hull label listbox vertsb
				

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

Download this sample code
man page | options | methods
 
  home || iwidgets || man pages cross ref distribution docs faq  
Copyright | Contributions | Development Team | Credits
Bugs/Comments/Suggestions about this web site