Tk Source Code

Artifact [c8e05238]
Login

Artifact c8e05238566d79fc7432dcfb99a300bb84c54582:

Attachment "ttk-high-contrast-#1-test.tcl" to ticket [309b4261] added by Martin0815 2016-12-12 16:04:19. (unpublished)
set cbVar 1
set rbVar 1

ttk::button .b -text {BUTTON TEST}

ttk::menubutton .mb -text {MENUBUTTON TEST} -menu .mb.m
menu .mb.m
.mb.m add command -label TEST
.mb.m add separator
.mb.m add command -label TEST1

ttk::checkbutton .cb -text {CHECKBUTTON TEST} -variable cbVar
ttk::radiobutton .rb -text {RADIOBUTTON TEST} -variable rbVar -value 1
ttk::label .l -text {LABEL TEST}
ttk::labelframe .lf -text {LABELFRAME TEST}
ttk::entry .lf.e
ttk::entry .lf.e1
ttk::entry .lf.e2
pack {*}[winfo children .lf] -fill x

ttk::scale .sc -from 0 -to 100
ttk::separator .s
ttk::panedwindow .pw
ttk::frame .pw.f1
ttk::combobox .pw.f1.cbx -text {COMBOBOX TEST} -values {1 2 3 4}
pack .pw.f1.cbx
ttk::frame .pw.f2
ttk::progressbar .pw.f2.pb -value 50
pack .pw.f2.pb

.pw add .pw.f1
.pw add .pw.f2

ttk::spinbox .sb -values {100 200 300 400} -text {SPINBOX TEST}

ttk::notebook .nb
ttk::frame      .nb.f
text            .nb.f.t -height 5
ttk::scrollbar  .nb.f.sbh -orient horizontal
ttk::scrollbar  .nb.f.sbv -orient vertical
grid .nb.f.t   -column 0 -row 0 -sticky nesw
grid .nb.f.sbv -column 1 -row 0 -sticky ns
grid .nb.f.sbh -column 0 -row 1 -sticky ew

ttk::treeview .nb.tv -columns {A B C D}

.nb add .nb.f -text Frame
.nb add .nb.tv -text Tree

.nb.tv heading 0 -text A
.nb.tv heading 1 -text B
.nb.tv heading 2 -text C
.nb.tv heading 3 -text D

set i  [.nb.tv insert {}  -1 -text TEST]
        .nb.tv insert $i  -1 -text TEST.1 -values {1 2 3 4}
set i1 [.nb.tv insert {}  -1 -text TEST1]
set i2 [.nb.tv insert $i1 -1 -text TEST1.1]
set i3 [.nb.tv insert $i2 -1 -text TEST1.2]

pack {*}[winfo children .] -fill x
pack .pw -fill both -expand 1
pack configure .s -padx 3 -pady 5


.lf.e  insert -1 {HELLO WORLD (normal)}
.lf.e1 insert -1 {HELLO WORLD (disabled)}
.lf.e2 insert -1 {HELLO WORLD (readonly)}
.lf.e1 configure -state disabled
.lf.e2 configure -state readonly