You should look at the description of "exportSelection" in
the Tk::options man page -- although this may only be relevant
if you're working in an X-Windows environment. If you're working
with MS-Windows, I'm not sure how this plays out.
If you are using X-Windows, note that the X paste buffer
can only work with one contiguous string at a time, and there
is no way around this. That's why selecting one string will
always deselect any other string -- except for Tk widgets
where "exportSelection" is false, and in those cases, the
highlighted string will stay highlighted when you select
something else, but you won't be able to paste it anywhere.
Well, maybe there's a way to create
or locate an "alternate" paste buffer, other than the
"standard" X paste buffer that is normally manipulated
with mouse buttons. This would be easy within the scope of
a single Perl/Tk app, but more challenging across independent
apps (think "inter-process communication").
I'm not sure, but I think that on MS-Windows, you have to
specifically request that a highlighted string be copied
into the window-manager's paste buffer in order to make it
paste-able into another window. But again, only one contiguous
string can be selected at a time for this sort of copying;
(and I don't even know whether or not this is part of your
question). | [reply] |