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