TComboBox: prevent execution of DefaultAction on parentform (e.g. Button with Default/Cancel := True) when pressing Enter/Cancel when DroppedDown (Issue #0024819).

git-svn-id: trunk@46762 -
This commit is contained in:
bart 2014-11-05 18:22:41 +00:00
parent e24d5e256c
commit 5f894bec77

View File

@ -479,7 +479,10 @@ begin
UserDropDown := ((Shift *[ssAlt] = [ssAlt]) and (Key = VK_DOWN));
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
if PreventDropDown then
begin
if DroppedDown then Key := VK_UNKNOWN; //prevent execution of DefaultAction (Delphi compatibility)
DroppedDown := False;
end;
if AutoDropDown or UserDropDown or FReturnArrowState then
begin
if PreventDropDown then