Posted to tcl by patthoyts at Fri Apr 25 09:32:01 GMT 2008view raw

  1. proc ::tkchat::OnTextFocus {w} {
  2. global Options
  3. if {[info exists Options(ClickFocusEntry)]
  4. && $Options(ClickFocusEntry)} {
  5. if {[winfo ismapped .eMsg]} {
  6. focus .eMsg
  7. } else {
  8. focus .tMsg
  9. }
  10. } else {
  11. focus $w
  12. }
  13. }
  14.  
  15.  
  16. in the console do:
  17. bind .txt <Button-1> {::tkchat::OnTextFocus %W}
  18. and
  19. set Options(ClickFocusEntry) 1