| 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

Selectiondialog

The selectiondialog iwidget provides a dialog based Selectionbox. For further information, see the Selectiondialog manpage

Components: bbox hull selectionbox separator
				

wm title . "Selectiondialog Example"

##
##	Helper procs
##
proc entrySelect {} {
	
	puts "Entry value: [.sd component selection get]"

	return

}; # end proc entrySelect

proc listSelect {} {

	puts "Listbox value: [.sd get]"

	.sd selectitem

	return 

}; # end proc listSelect

##=========================================================
##	Create a selectiondialog iwidget
##=========================================================
##
iwidgets::selectiondialog .sd \
	-childsitepos w \
	-selectioncommand entrySelect \
	-itemscommand listSelect \
	-textbackground lightblue \
	-selectbackground gray \
	-selectforeground white \
	-title "Selectiondialog Example" \
	-itemslabel "Iwidgets Library" \
	-modality application
	

##
##	Add some items to the listbox
##
cd ${iwidgets::library}/scripts
eval .sd insert items end [glob -nocomplain *.itk]

##
##	Modify the buttonbox
##
.sd hide Apply
.sd buttonconfigure OK \
	-text "View"

##
##	Activate and wait for user input
##
if [.sd activate] {
	puts "Selected [.sd get]"
}

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