Artifact
90b5163c098785214f81f4ce15a3588fb9b0902c4dc889bfb50a25543f24edf8:
Attachment "b3b56ae8dc - ttk widgets overwrite user-set -cursor option.tcl" to
ticket [b3b56ae8]
added by
fvogel
2019-11-02 14:32:13.
# b3b56ae8dc - ttk widgets overwrite user-set -cursor option
package require Tk
# a ttk button works
ttk::button .b -text Quit
.b configure -cursor X_cursor
puts "config = [.b configure]"
pack .b
# a ttk treeview does not work: the user-set cursor is not shown
ttk::treeview .t
.t configure -cursor X_cursor
.t configure -columns {Col1 Col2}
.t heading #0 -text {Tree}
.t heading Col1 -text {Col1}
.t heading Col2 -text {Col2}
pack .t
# .t configure -cursor arrow
# .t configure -cursor X_cursor
# .t configure -cursor circle ; # not in the list
# .t configure -cursor busy ; # in the list
# a ttk combobox does not work: the user-set cursor is not shown
set values [list Orange Apple Peas]
ttk::combobox .c -values $values -cursor dotbox
pack .c
.c configure -state readonly
# a ttk spinbox does not work: the user-set cursor is not shown
set values [list Orange Apple Peas]
ttk::spinbox .s -values $values -cursor hand1
pack .s
.s configure -state readonly
# a ttk panedwindow does not work: the user-set cursor is not shown
# custom-looking sash
image create photo img:sash -data {
R0lGODlhBQB5AKECADMzM9TQyP///////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAAMALAAA
AAAFAHkAAAJOjA95y+0LUAxpUkufboLh1UFPiIyeKTqk8R1rpp5xysk1zbytoaPl/LsFczYiDlRE
Hl1J5pLXhD4DPSDLd7XChFnudgO2KC5izA6sqTQKADs=
}
ttk::style element create Sash.xsash image \
[list img:sash ] \
-border {1 1} -sticky ew -padding {1 1}
ttk::style layout TPanedwindow {
Sash.xsash
}
# panedwindow in itself
set pw [ttk::panedwindow .pw -orient horizontal -cursor clock]
ttk::label $pw.l1 -text "Label in pane 1"
pack $pw.l1
ttk::label $pw.l2 -text "Label in pane 2"
pack $pw.l1
$pw add $pw.l1
$pw add $pw.l2
pack $pw -expand 1 -fill both