Artifact
baae7f8fe6bf0bb85ba9af6dd59a6e55e25efe02:
Attachment "tristate.tcl" to
ticket [3217462f]
added by
auriocus
2012-11-24 18:03:33.
package require Tk
# enabled
ttk::checkbutton .c -text "Check on" -variable c
ttk::radiobutton .r -text "Radio on" -value 1 -variable r
ttk::checkbutton .cf -text "Check off" -variable cf
ttk::radiobutton .rf -text "Radio off" -value 1 -variable rf
ttk::checkbutton .ct -text "Check 3state" -variable ct
ttk::radiobutton .rt -text "Radio 3state" -value 1 -variable rt
# disabled
ttk::checkbutton .cds -text "Check disabled on" -variable cds
ttk::radiobutton .rds -text "Radio disabled on" -value 1 -variable rds
ttk::checkbutton .cd -text "Check disabled off" -variable cd
ttk::radiobutton .rd -text "Radio disabled off" -value 1 -variable rd
ttk::checkbutton .cdt -text "Check disabled 3state" -variable cdt
ttk::radiobutton .rdt -text "Radio disabled 3state" -value 1 -variable rdt
ttk::combobox .t -textvariable theme -values [ttk::themes]
bind .t <<ComboboxSelected>> { ttk::style theme use $theme }
set c 1
set r 1
set ct 0
set rt 0
.rd state disabled
.cd state disabled
.rds state disabled
.cds state disabled
.cdt state disabled
.rdt state disabled
set rds 1
set cds 1
set rd 0
set cd 0
unset ct
unset rt
set cf 0
set rf 0
grid .c .r -sticky w
grid .cf .rf -sticky w
grid .ct .rt -sticky w
grid .cds .rds -sticky w
grid .cd .rd -sticky w
grid .cdt .rdt -sticky w
grid .t -