mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 12:59:59 +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));
|
UserDropDown := ((Shift *[ssAlt] = [ssAlt]) and (Key = VK_DOWN));
|
||||||
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
|
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
|
||||||
if PreventDropDown then
|
if PreventDropDown then
|
||||||
|
begin
|
||||||
|
if DroppedDown then Key := VK_UNKNOWN; //prevent execution of DefaultAction (Delphi compatibility)
|
||||||
DroppedDown := False;
|
DroppedDown := False;
|
||||||
|
end;
|
||||||
if AutoDropDown or UserDropDown or FReturnArrowState then
|
if AutoDropDown or UserDropDown or FReturnArrowState then
|
||||||
begin
|
begin
|
||||||
if PreventDropDown then
|
if PreventDropDown then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user