mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:19:16 +02:00
LCL: ComboBox: Fixed data lost, Style csSimple, leaving with TAB. Issue #35087. Patch by Gernot Riebold
git-svn-id: branches/fixes_2_0@63372 -
This commit is contained in:
parent
0dc7f8bbe1
commit
eb3b58c86e
@ -491,14 +491,12 @@ var
|
|||||||
begin
|
begin
|
||||||
Skip := False;
|
Skip := False;
|
||||||
UserDropDown := ((Shift *[ssAlt] = [ssAlt]) and (Key = VK_DOWN));
|
UserDropDown := ((Shift *[ssAlt] = [ssAlt]) and (Key = VK_DOWN));
|
||||||
|
if Style = csSimple then
|
||||||
|
PreventDropDown := Key in [VK_RETURN, VK_ESCAPE]
|
||||||
|
else
|
||||||
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
|
begin
|
||||||
// Prevent execution of DefaultAction (Delphi compatibility) except for
|
|
||||||
// style csSimple. There DroppedDown is always true (Delphi compatible).
|
|
||||||
// Tab key should work further and shouldn't be deleted. Issue #32559
|
|
||||||
if DroppedDown and not (Style = csSimple) then
|
|
||||||
Key := VK_UNKNOWN;
|
|
||||||
DroppedDown := False;
|
DroppedDown := False;
|
||||||
end;
|
end;
|
||||||
// if AutoDropDown then don't close DropDown, like in Delphi, issue #31247
|
// if AutoDropDown then don't close DropDown, like in Delphi, issue #31247
|
||||||
|
Loading…
Reference in New Issue
Block a user