mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 04:59:20 +01:00
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:
parent
e24d5e256c
commit
5f894bec77
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user