Tk Source Code

Artifact [ab52c7ae]
Login

Artifact ab52c7ae965679a33d4cfe7a404fd9b0c724f6819dd893b8a3727db19eafdb95:

Attachment "selection-utf8.tcl" to ticket [af31a84c] added by sbron 2023-12-13 11:13:59.
proc selproc {str offset count} {
    return [string range $str $offset [expr {$offset + $count -1}]]
}

selection own .

selection handle . {selproc "Original"}
puts "STRING: [selection get -type STRING]"
puts "UTF8_STRING: [selection get -type UTF8_STRING]"

selection handle . {selproc "Replaced"}
puts "STRING: [selection get -type STRING]"
puts "UTF8_STRING: [selection get -type UTF8_STRING]"