Edwin Yip 154 Posted August 28, 2020 Is there an enhanced TEdit (single-line edit, not multi-line editing such as TSynEdit) with enhanced keyboard support? By enhanced keyboard support I mean for example, Ctrl+Backspace to delete a word, and so on. Share this post Link to post
dummzeuch 1517 Posted August 28, 2020 Isn't a single line edit part of synedit? Share this post Link to post
Edwin Yip 154 Posted August 28, 2020 52 minutes ago, dummzeuch said: Isn't a single line edit part of synedit? To be specific, which component? Share this post Link to post
David Heffernan 2354 Posted August 28, 2020 (edited) Why don't you use the native Win32 TEdit but just enable CTRL+BACKSPACE? Call SHAutoComplete(WindowHandle, SHACF_AUTOAPPEND_FORCE_OFF or SHACF_AUTOSUGGEST_FORCE_OFF); in an overridden CreateWnd. Use an interposer, or some other mechanism to get this code to run. Edited August 28, 2020 by David Heffernan 1 Share this post Link to post
Darian Miller 366 Posted August 28, 2020 Related StackOverflow topic: https://stackoverflow.com/questions/10305634/ctrlbackspace-in-delphi-controls (Be aware of side effects.) Some history on the topic: https://devblogs.microsoft.com/oldnewthing/20071011-00/?p=24823 1 Share this post Link to post
Edwin Yip 154 Posted August 28, 2020 2 hours ago, David Heffernan said: Why don't you use the native Win32 TEdit but just enable CTRL+BACKSPACE? Call SHAutoComplete(WindowHandle, SHACF_AUTOAPPEND_FORCE_OFF or SHACF_AUTOSUGGEST_FORCE_OFF); in an overridden CreateWnd. Use an interposer, or some other mechanism to get this code to run. Did a full text search of `SHAutoComplete` into my repositories and I couldn't believe I already have (but forgotten) a TEdit-derived control which already uses this trick, the code looks like: [UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)] procedure TEyEdit.CreateWnd; begin inherited; //enable ctrl+backspace: http://stackoverflow.com/a/10305706/133516 SHAutoComplete(Self.Handle, SHACF_AUTOAPPEND_FORCE_OFF or SHACF_AUTOSUGGEST_FORCE_OFF) end; Share this post Link to post
Edwin Yip 154 Posted August 28, 2020 But followed this HeidiSQL discussion this approach seems to be too issue-introducing... Share this post Link to post
Edwin Yip 154 Posted August 28, 2020 And it seems that the HeidiSQL author went for another approach. Will check it later. Share this post Link to post
David Heffernan 2354 Posted August 28, 2020 3 hours ago, Edwin Yip said: But followed this HeidiSQL discussion this approach seems to be too issue-introducing... I use SHAutoComplete and don't have any issues. 1 Share this post Link to post