Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-10

How to deselect text in edit control

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

Whenever I press the enter key in an edit control which is not configured to tab to the next item, all the ext in the edit control becomes selected.

Is there some way to disable this behaviour, or unselect the selected text?

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121009/03181629/attachment.html>

Reply by email

Howard Page-Clark
to Frank Church
Frank Church wrote 6 lines
Whenever I press the enter key in an edit control which is not configured to tab to the next item, all the ext in the edit control becomes selected. Is there some way to disable this behaviour, or unselect the selected text?

Try setting AutoSelect to False (I'm not sure if this is effective on all platforms).
Else trap the Enter key in the OnKeyPress event and set it to #0 or whatever suits your purpose.

Reply by email

Frank Church
to Howard Page-Clark
Howard Page-Clark wrote 19 lines
On 09/10/12 1:32, Frank Church wrote: > > Whenever I press the enter key in an edit control which is not > configured to tab to the next item, all the ext in the edit control > becomes selected. > > Is there some way to disable this behaviour, or unselect the selected > text? > Try setting AutoSelect to False (I'm not sure if this is effective on all platforms). Else trap the Enter key in the OnKeyPress event and set it to #0 or whatever suits your purpose. --

It turns out the OnKeyUp was the right key to test for.

Thanks for the hint

Show quoted text 5 lines
______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121014/924133e8/attachment.html>

Reply by email