Patch for addition of -selectbackground to text tags.
Take this as a trial balloon. If the principles of implementation turn out to be correct, I would provide additional patches for the rest of what is requested in #1759972.
The patch is against the latest Fossil sources of Tk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Btw, test case showing the new -selectbackground feature:
text .t
.t insert 1.0 "hello world line 1\n"
.t insert end "hello world line 2\n"
.t insert end "hello world line 3\n"
pack .t
.t tag add mytag 1.1 1.4 2.6 2.10
.t tag configure mytag -background green
.t tag configure mytag -selectbackground yellow ; # new !!
.t tag add sel 1.2 1.7 2.1 2.12
focus -force .t
.t tag cget mytag -selectbackground
.t tag configure mytag
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Proposal for implementation of -selectbackground option only (for the time being)
Patch for addition of -selectbackground to text tags.
Take this as a trial balloon. If the principles of implementation turn out to be correct, I would provide additional patches for the rest of what is requested in #1759972.
The patch is against the latest Fossil sources of Tk.
Btw, test case showing the new -selectbackground feature:
text .t
.t insert 1.0 "hello world line 1\n"
.t insert end "hello world line 2\n"
.t insert end "hello world line 3\n"
pack .t
.t tag add mytag 1.1 1.4 2.6 2.10
.t tag configure mytag -background green
.t tag configure mytag -selectbackground yellow ; # new !!
.t tag add sel 1.2 1.7 2.1 2.12
focus -force .t
.t tag cget mytag -selectbackground
.t tag configure mytag