home *** CD-ROM | disk | FTP | other *** search
/ Practical Programming in Tcl & Tk (4th Edition) / TCLBOOK4.BIN / pc / exsource.old / 36_2.tcl < prev    next >
Text File  |  2003-04-15  |  267b  |  19 lines

  1. #
  2. # Example 36-2
  3. # Separate paste actions.
  4. #
  5.  
  6. bind Text <<Paste>> {
  7.     catch {%W insert insert \
  8.         [selection get -selection CLIPBOARD]
  9.     }
  10. }
  11. bind Text <ButtonRelease-2> {
  12.     %W mark set insert @%x,%y
  13.     catch {%W insert insert \
  14.         [selection get -selection PRIMARY]
  15.     }
  16. }
  17.  
  18.  
  19.