Delphi: Select all with CTRL+A in Memo
Question by Chematik | 2012-09-10 at 17:42
I have a TMemo on a form. When I press the key combination CTRL and A in the memo, I expect that everything will be marked. But nothing happens with this shortcut.
How can that be? Would Windows not have to ensure that CTRL-A is working? And how can I achieve it, that these keys are working?
Related Topics
Firefox: 15 useful keyboard shortcuts no one knows
Article | 0 Comments
Delphi/Lazarus: Catch CTRL+C in Memo or Edit and Change Clipboard Content
Tutorial | 0 Comments
Delphi/Lazarus: Prevent user from using CTRL+C in Memo or Edit Field
Tutorial | 0 Comments
Delphi: System-Wide HotKey
Tutorial | 1 Comment
Delphi/Lazarus: Is the ALT, SHIFT or CTRL key pressed?
Tutorial | 0 Comments
Delphi/Lazarus: Select all with CTRL+A in ListView
Tip | 0 Comments
Delphi: Global Treatment of Errors (Exceptions)
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
A memo field only shows this behavior, if you add the following code in the OnKeyDown event of the memo:
With this, at every keystroke, it will be looked, whether the user hits the key A while the CTRL key is presed. The 65 is the code of A, which you can also retrieve with ord(A).
2012-09-10 at 22:20
Here's yet a better way to handle it...
2019-03-10 at 16:51
Thank you I tryed the second it works.
2019-11-07 at 08:47