home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
36_1.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
259b
|
17 lines
#
# Example 36-1
# Paste the PRIMARY or CLIPBOARD selection.
#
proc Paste { text } {
if [catch {selection get} sel] {
if [catch {selection get -selection CLIPBOARD} sel] {
# no selection or clipboard data
return
}
}
$text insert insert $sel
}