| 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

Panedwindow

The panedwindow iwidget is composed of panes, separators, and sashes for adjustment of the separators. Each pane is a child site and the class provides a command which returns the paths for the sites. The user may fill them with further widget combinations. The Panedwindow offers significant control over its presentation through a large set of options. The option set allows specification of the distance between a pane and its contents, the minimum size a pane's contents may reach, the orientation of separators, the thickness of the separators, as well as the dimensions, position, and cursor associated with the sash. For further information, see the Panedwindow manpage

Components: hull
				

wm title . "Panedwindow Example"

wm geometry . 400x200

##
##	helper proc to display text
##
proc showText {} {
	global cs

	set i [$cs(bitmap).slb getcurselection]

	$cs(text).st clear
	$cs(text).st insert 1.0 "You picked the $i bitmap"

	$cs(display).lab configure \
		-bitmap $i

	return

}; # end proc showText

##=========================================================
##	Create a panedwindow iwidget
##=========================================================
##
iwidgets::panedwindow .pw \
	-orient vertical \
	-sashwidth 25  \
	-sashheight 25  \
	-showhandle 2

##
##	Add the panes
##
foreach p {bitmap text display} {
	.pw add $p
	set cs($p) [.pw childsite $p]
}

.pw fraction 30 50 20

##
##	Add other widgets to the panes
##
iwidgets::scrolledlistbox $cs(bitmap).slb \
	-vscrollmode static \
	-hscrollmode dynamic \
	-labeltext bitmaps \
	-selectioncommand {showText}

iwidgets::scrolledtext $cs(text).st \
	-vscrollmode static \
	-hscrollmode dynamic \
	-wrap word \
	-labeltext "Description"

label $cs(display).lab
	
##
##	Add some bitmaps into the listbox
##
foreach i {error hourglass question info} {
	$cs(bitmap).slb insert end $i
}

pack $cs(bitmap).slb $cs(text).st $cs(display).lab \
	-fill both \
	-expand 1

pack .pw \
	-fill both \
	-expand 1

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