'''dgw::sbuttonbar'''
[DDG] 2019-11-12: A [snidget] widget for a nice buttonbar where buttons have rounded corners, based on old [gbuttons] code from Steve Landers.
'''Homepage and Download'''
* Homepage: https://chiselapp.com/user/dgroth/repository/tclcode
* Download: https://chiselapp.com/user/dgroth/repository/tclcode/download * Manual: https://chiselapp.com/user/dgroth/repository/tclcode/doc/tip/dgw/sbuttonbar.html
'''Installation as Tcl-module'''
Put the file with the source code somewhere in a directory like /home/username/tcl/dgw/sbuttonbar-0.5.tm
In your code you would now have to write:
======
tcl::tm::path add /home/username/tcl
package require dgw::sbuttonbar
======
[dgw::sbuttonbar-image]
See below for the code of this example:and an example usage.
======
package require dgw::sbuttonbar
pack [frame .f -bg #fff] -side top -fill x -expand nopack [dgw::sbuttonbar .f.t -bg #fff] -side top ;# -fill x -expand no
set b0 .f.t
$b0 insert Back -command [list Cmd 0]
$b0 insert Forward -command [list Cmd 1] -state disabled
$b0 insert Home
$b0 insert End -command [list puts End]
$b0 itemconfigure End -state disabled
proc Cmd {state} {
global b0
tk_messageBox -type ok -message "Cmd"
if {$state == 0} {
$b0 itemconfigure Forward -state normal
$b0 itemconfigure Back -state disabled
} else {
$b0 itemconfigure Forward -state disabled
$b0 itemconfigure Back -state normal
}
}
======
----
'''See also'''
* [gbuttons] (buttons)
* [snitbutton] (port of gbuttons to snit)
* [Lightbutton] (radio & checkbuttons)
<<categories>> Package | Widget | Snit Widgets