diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-02-22 11:52:04 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-02-22 11:52:04 +0000 |
commit | 1367b2f3a7c0e00434aa1a3737188a7cab50b7f7 (patch) | |
tree | 5e1cd5c13e30e0aec7c63e16bdffa5f155fae884 /examples/apps | |
parent | 5660fac5a979a833dcde3dbbc768aeadd3ccece7 (diff) | |
download | fpGUI-1367b2f3a7c0e00434aa1a3737188a7cab50b7f7.tar.xz |
fpg_edittext: Adds cut to clipboard support.
Diffstat (limited to 'examples/apps')
-rw-r--r-- | examples/apps/ide/src/fpg_textedit.pas | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas index 3b191267..00808d7d 100644 --- a/examples/apps/ide/src/fpg_textedit.pas +++ b/examples/apps/ide/src/fpg_textedit.pas @@ -189,6 +189,7 @@ type procedure ScrollTo(X, Y: Integer); procedure GotoLine(ALine: integer); procedure CopyToClipboard; + procedure CutToClipboard; procedure PasteFromClipboard; procedure DeleteSelection; function GetSelectedText: TfpgString; @@ -1497,6 +1498,14 @@ begin fpgClipboard.Text := GetSelectedText; end; +procedure TfpgBaseTextEdit.CutToClipboard; +begin + if not FSelected then + Exit; + CopyToClipboard; + DeleteSelection; +end; + procedure TfpgBaseTextEdit.PasteFromClipboard; begin if FSelected then |