Posted to tcl by Bradipo at Thu Jul 25 16:30:04 GMT 2024view raw
- proc handle {w} {
- $w delete 1.0 end
- }
- proc view {w} {
- puts stderr [binary encode hex [$w get 1.0 end]]
- }
- frame .f
- text .f.t -setgrid 1 -width 80 -height 3 -wrap word
- pack .f -expand 1 -fill both
- pack .f.t -expand 1 -fill both
- bind .f.t <Return> [list handle .f.t]
- bind .f.t <Control-Return> [list handle .f.t]
- bind .f.t <Control-x> [list handle .f.t]
- bind .f.t <Key-x> [list handle .f.t]
- bind .f.t <KeyRelease> [list view .f.t]
- focus .f.t