| 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

Labeledwidget

The labeledwidget iwidget is the most primitive mega-widget in the set, providing label support in the other classes. The class contains a label, a margin, and a child site which can be filled with other widgets. The options provide the ability to position the label around the child site, modify the font, adjust the margin distance, and enable/disable label display. For further information, see the Labeledwidget manpage

Components: hull label
				

wm title . "Labeledwidget Example"


##
##	Generate some colors
##
array set c {1 red 2 green 3 blue 4 black}

##=========================================================
##	Create some labeledwidgets
##=========================================================
##
foreach {lw p} {1 n 2 s 3 e 4 w} {
	iwidgets::labeledwidget .lw$lw \
		-labeltext "Canvas $lw" 

	set cs [.lw$lw childsite]

	##
	##	create an example widget
	##
	canvas $cs.c \
		-relief raised \
		-width 100 \
		-height 100 \
		-background $c($lw)

	grid config $cs.c

	grid config .lw$lw \
		-column [expr {($lw-1)/2}]\
		-row [expr {($lw-1)%2}]\
		-sticky news \
		-padx 20 \
		-pady 20


	##
	##	Do a post configure
	##
	.lw$lw configure \
		-labelpos $p \
		-labelmargin 10
}

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