Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Ignore Ctrl+V keys in Memo
If you want to paste to your Memo component only some constant text, then you may use onKeyDown event.In this event you may clear a clipboard's content and set into SelText property your constant string.
uses Clipbrd;
...
procedure TForm1.Memo1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ((Key=Ord('V'))and(ssCtrl in Shift)) then
begin
Clipboard.Clear;
Memo1.SelText:='Delphi is great';
Key:=0;
end;
end;
- Related components
- TFileSearch
- TFolderMonitor
- TFileVersion
-
More for developers