Posted to tcl by patthoyts at Fri Apr 25 09:32:01 GMT 2008view raw
- proc ::tkchat::OnTextFocus {w} {
- global Options
- if {[info exists Options(ClickFocusEntry)]
- && $Options(ClickFocusEntry)} {
- if {[winfo ismapped .eMsg]} {
- focus .eMsg
- } else {
- focus .tMsg
- }
- } else {
- focus $w
- }
- }
- in the console do:
- bind .txt <Button-1> {::tkchat::OnTextFocus %W}
- and
- set Options(ClickFocusEntry) 1