Posted to tcl by schelte at Sat Jan 04 16:38:44 GMT 2014view pretty

wm geometry . 650x450;
ttk::notebook .nb -width 600 -height 400
.nb add [frame .nb.f1 -bg wheat] -text "First tab"
 
.nb add [frame .nb.f2 -class TNotebookT] -text "Second tab"
button .nb.f2.b1 -textvariable c(co) -command change_color
pack .nb.f2.b1 -side left -anchor n
set c(co) [string trim $c(co)]
button .nb.f2.bb1 -text " " -command "change_color_single $c(co)"
pack .nb.f2.bb1 -side left -anchor n
label .nb.f2.t1 -text "One color at a time"
pack .nb.f2.t1 -side bottom -anchor n
 
.nb add [frame .nb.f3 -bg wheat] -text "Third tab"
label .nb.f3.l1 -text "All the colors in one 'text' item"
pack .nb.f3.l1 -side bottom -anchor e
 
scrollbar .nb.f3.sbar -orient vertical -command [list .nb.f3.tb yview]
pack .nb.f3.sbar -side right -fill y
text .nb.f3.tb -yscrollcommand [list .nb.f3.sbar set] -width 40 -height 20
pack .nb.f3.tb -side left -anchor e -fill both -expand 1
 
# fill_text
 
.nb add [frame .nb.f4 -bg wheat] -text "Fourth tab"
pack .nb