diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-19 10:11:11 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-19 10:11:11 +0100 |
commit | f408f66f6212f9bf7566cfb9272bb267db4efb14 (patch) | |
tree | ca9d81b158d04d17246699e0758833090bcfe4f1 /examples | |
parent | ddfd98f7d468a9cb8971603d8b46cebafa6cb345 (diff) | |
download | fpGUI-f408f66f6212f9bf7566cfb9272bb267db4efb14.tar.xz |
debug server: now allows you to copy selected message to clipboard
Diffstat (limited to 'examples')
-rw-r--r-- | examples/apps/debugserver/frm_main.pas | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/examples/apps/debugserver/frm_main.pas b/examples/apps/debugserver/frm_main.pas index 3e0fdd33..499bc48f 100644 --- a/examples/apps/debugserver/frm_main.pas +++ b/examples/apps/debugserver/frm_main.pas @@ -114,6 +114,7 @@ type procedure ShowMessageWindow; procedure miPauseClicked(Sender: TObject); procedure miFileQuit(Sender: TObject); + procedure miEditCopy(Sender: TObject); procedure miHelpAboutFPGui(Sender: TObject); procedure miHelpProductInformation(Sender: TObject); procedure btnClearClicked(Sender: TObject); @@ -133,6 +134,7 @@ implementation uses dateutils ,fpg_dialogs + ,fpg_constants ; @@ -271,6 +273,12 @@ begin Close; end; +procedure TMainForm.miEditCopy(Sender: TObject); +begin + if (grdMessages.RowCount > 0) and (grdMessages.FocusRow <> -1) then + fpgClipboard.Text := grdMessages.Cells[2, grdMessages.FocusRow]; +end; + procedure TMainForm.miHelpAboutFPGui(Sender: TObject); begin TfpgMessageDialog.AboutFPGui; @@ -371,9 +379,9 @@ begin begin Name := 'mnuEdit'; SetPosition(260, 126, 120, 24); - AddMenuItem('Cut', '', nil).Enabled := False; - AddMenuItem('Copy', '', nil).Enabled := False; - AddMenuItem('Paste', '', nil).Enabled := False; +// AddMenuItem('Cut', '', nil).Enabled := False; + AddMenuItem('Copy selected message to clipboard', rsKeyCtrl+'C', @miEditCopy); +// AddMenuItem('Paste', '', nil).Enabled := False; AddMenuItem('-', '', nil); AddMenuItem('Preferences...', '', nil).Enabled := False; end; |