in reply to Re^2: Entry Widget (copy and paste issue)
in thread Entry Widget (copy and paste issue)

I understood. You need to bind a sub to Paste that will overwrite the hilighted text, because the default binding will not do that, not under any circumstance
  • Comment on Re^3: Entry Widget (copy and paste issue)

Replies are listed 'Best First'.
Re^4: Entry Widget (copy and paste issue)
by rookie_monk (Novice) on Sep 15, 2010 at 17:24 UTC
    OH, thanks. Just thought everyone didn't understand what I was trying to do. Thanks.
Re^4: Entry Widget (copy and paste issue)
by Anonymous Monk on Nov 10, 2014 at 15:01 UTC
    $MW->bind('Tk::Entry', '<Control-v>',\&overwrite_paste); sub overwrite_paste{ my $entry = $_[0]; if($entry->selectionPresent){ $entry->delete('sel.first', 'sel.last'); $entry->selectionClear; $entry->insert(0,$entry->clipboardGet); } }