| imahacker@the-pentagon.com 2005-01-17, 3:58 pm |
| hi, perl/tk newb. i've been doing great with this but ran into a
little problem. i have several entry widgets, and i want to be able to
cut/paste between them. kbd shortcuts work, but i want a right-click
menu. i have the mouse button binded, copy works fine, i do it like
so:
sub copy{
$ctc = $mw->SelectionGet();
$CLIP->Set("$ctc");
$statusbar = "copied: $ctc";
}
whats the trick to paste? the function works, the following will put
my text into the variable pfc, but how do you actually make it display
on the gui? (note: not the dos window in the background.) i thought i
was on the right track with the insert command, but you have to have
the entry widget name (of course.) is there a way to make it insert
the $pfc where the cursor is currently on the gui app?
sub paste{
$pfc = $CLIP->GetText;
print "$pfc";
}
any pointers in the right direction will be appreciated.
|