| 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

Extbutton

The extbutton iwidget extends the behavior of the Tk button by allowing a bitmap or image to coexist with text. The image will be able to be positioned anywhere relative to the text of the button (n,e,w,s, etc). For further information, see the Extbutton manpage

Components: frame hull image label ring
				

wm title . "Extbutton Example"

##
##	NOTE: This is similar to the toolbar example,
##	      but notice we are using extbuttons here
##	      instead of the Tk buttons
##

##
##	Create a toolbar iwidget for demo purposes
##
iwidgets::toolbar .tb \
	-balloonbackground #336699 \
	-balloonforeground white \
	-balloondelay1 500 \
	-balloondelay2 150 \
	-helpvariable helpVar

set dir [file join ${iwidgets::library} demos images]

##=========================================================
##	Add some extbutton iwidgets to the toolbar
##=========================================================
##
foreach b {copy paste clear} {

	.tb add iwidgets::extbutton $b \
		-balloonstr "[string totitle $b] it" \
		-helpstr "this will $b the selection" \
		-text "$b" \
		-imagepos n \
		-command "puts $b" \
		-relief groove \
		-image [image create photo -file [file join $dir $b.gif]]
}


##
##	Add a status bar
##
label .stat \
	-textvariable helpVar \
	-relief ridge \
	-background white \
	-foreground #336699 \
	-width 25

pack .tb .stat \
	-expand 1 \
	-fill both \
	-pady 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