Chapter 35. Selections and the Clipboard

   

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Part V.  Tk Details


Cut and paste allows information exchange between applications, and it is built upon a general purpose selection mechanism. The CLIPBOARD selection is used to implement cut and paste on all platforms. X Windows applications may also use the PRIMARY selection. This chapter describes the selection and clipboard commands.

Copy and paste is a basic way to transfer data between just about any two applications. In Tk, copy and paste is based on a general selection mechanism where the selection has a name, type, format, and value. For the most part you can ignore these details because they are handled by the Tk widgets. However, you can also control the selection explicitly. This chapter describes the selection model and the selection and clipboard commands. The last section of this chapter presents an example that implements copy and paste of graphical objects in a canvas.


       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net