OUTPUT BUFFER:
#!/usr/local/bin/wish if {[tk windowingsystem] eq "aqua"} { catch {set origUseCustomMDEF $::tk::mac::useCustomMDEF; set ::tk::mac::useCustomMDEF 1} } puts "ttk themes : [ttk::style theme names]" set Lt [ttk::style theme names] set iTh -1 set ltxt "use : " proc changet {} { global Lt iTh ltxt incr iTh if {$iTh >= [llength $Lt]} { set iTh 0 } ttk::style theme use [lindex $Lt $iTh] set ltxt "use : [lindex $Lt $iTh]" return } button .t \ -text " THEMES " \ -command [list changet] label .l -textvariable ltxt \ -font "Helvetica 14 bold" pack .t .l -side left ttk::style configure vdx.TButton \ -background black \ -foreground white ttk::style configure ok.TButton \ -background green \ -foreground black ttk::style configure ok.TButton.label \ -background green \ -foreground black ttk::style configure dis.TButton \ -background red \ -foreground black ttk::style configure cyan.TButton \ -background cyan \ -foreground black if {0} { ttk::style map vdx.TButton \ -background [list disabled black active black] \ -foreground [list disabled white active white] \ -relief [list {pressed !disabled} flat] ttk::style map ok.TButton \ -background [list disabled green active green] \ -foreground [list disabled black active black] \ -relief [list {pressed !disabled} flat] ttk::style map dis.TButton \ -background [list disabled red active red] \ -foreground [list disabled black] \ -relief [list {pressed !disabled} sunken] ttk::style map cyan.TButton \ -background [list disabled cyan active cyan] \ -foreground [list disabled black] \ -relief [list {pressed !disabled} sunken] } ttk::button .b1 \ -text "button 1" \ -style vdx.TButton ttk::button .b2 \ -text "button 2" \ -style ok.TButton ttk::button .b3 \ -text "button 3" \ -style dis.TButton ttk::button .b4 \ -text "button 4" \ -style cyan.TButton pack .b1 .b2 .b3 .b4 -side bottom