home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
36_6.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
416b
|
28 lines
#
# Example 36-6
# The copy and cut operations.
#
proc CanvasCopy { w } {
global canvas
if [info exists canvas(select,$w)] {
set id $canvas(select,$w)
clipboard clear
clipboard append [CanvasDescription $w $id]
}
}
proc CanvasDelete {w} {
global canvas
catch {
$w delete highlight
$w delete $canvas(select,$w)
unset canvas(select,$w)
}
}
proc CanvasCut { w } {
CanvasCopy $w
CanvasDelete $w
}