Get Ctrl+Backspace hotkey to work in grid inplace editor, by enabling autocompletion + autosuggestion. Fixes issue #3168.

This commit is contained in:
Ansgar Becker
2013-09-29 08:09:04 +00:00
parent b74f2c6fbb
commit ddaaa7b34e

View File

@ -8,7 +8,7 @@ uses
Windows, Forms, Graphics, Messages, VirtualTrees, ComCtrls, SysUtils, Classes, Windows, Forms, Graphics, Messages, VirtualTrees, ComCtrls, SysUtils, Classes,
StdCtrls, ExtCtrls, CheckLst, Controls, Types, Dialogs, Menus, Mask, DateUtils, Math, StdCtrls, ExtCtrls, CheckLst, Controls, Types, Dialogs, Menus, Mask, DateUtils, Math,
dbconnection, mysql_structures, helpers, texteditor, bineditor, gnugettext, dbconnection, mysql_structures, helpers, texteditor, bineditor, gnugettext,
StrUtils; StrUtils, ShLwApi;
type type
// Radio buttons and checkboxes which do not pass <Enter> key to their parent control // Radio buttons and checkboxes which do not pass <Enter> key to their parent control
@ -1045,6 +1045,9 @@ begin
FEdit.ParentColor := True; FEdit.ParentColor := True;
FEdit.BorderStyle := bsNone; FEdit.BorderStyle := bsNone;
FEdit.OnKeyDown := DoKeyDown; FEdit.OnKeyDown := DoKeyDown;
// Get Ctrl+Backspace hotkey to work, by enabling autocompletion + autosuggestion
// See issue #3168
SHAutoComplete(FEdit.Handle, SHACF_AUTOAPPEND_FORCE_OFF or SHACF_AUTOSUGGEST_FORCE_OFF);
FMainControl := FEdit; FMainControl := FEdit;
FButton := TButton.Create(FPanel); FButton := TButton.Create(FPanel);