Version 6 of Tk's copy and paste support

Updated 2005-05-01 04:21:11

Purpose: discuss unique features and special concerns relating to copy and paste functionality within Tk.

Q1. How do I get copy and paste within a Tk application?

A1. Copy and paste should, in general, work out of the box.

Q2. What about copy and paste between major versions like 7.6 or 8.0 and

        8.1 and newer?  Does copy and paste work between non-[Unicode] Tk and 
        Unicode Tk?

A2. Yes. It uses UTF8_STRING on unix and the standard APIs on Windows.

Q3. Anything special that needs to be done about copy and paste between Tk 8.1 and newer and non-Tk applications?

3. No.

Q4. ... between Java applications and Tk 8.1 and newer applications?

A4. Same as above.

Q5. Does this work on Windows, MacOS, etc?

A5. OS X has some unicode display issues as of 8.4.9, but everywhere else is OK.

Q6. On X, there are several kinds of selection - clipboard, cutbuffers, etc. What does Tk's copy and paste use, and are there ways to access the other buffers?

A6. Using the clipboard and selection commands, it uses the PRIMARY selection, but you can access others via selection.

Q7. Has anyone done any interesting development relating to Tk's copy and paste functionality?

A7. These have potential interest

Q8. Are other people annoyed that they can't select (copy) text from a label widget? I often misuse an entry widget (disabled) just to get copy capability. (EKB - no, I don't expect to be able to copy from a label. If I use a disabled entry widget to allow a copy, I make sure it's sunken or otherwise distinguished from a label.)

[fill in more questions as needed]


Category Concept Category Discussion