mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:48:03 +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
|
||||
Skip := False;
|
||||
UserDropDown := ((Shift *[ssAlt] = [ssAlt]) and (Key = VK_DOWN));
|
||||
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
|
||||
if Style = csSimple then
|
||||
PreventDropDown := Key in [VK_RETURN, VK_ESCAPE]
|
||||
else
|
||||
PreventDropDown := Key in [VK_TAB, VK_RETURN, VK_ESCAPE];
|
||||
if PreventDropDown then
|
||||
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;
|
||||
end;
|
||||
// if AutoDropDown then don't close DropDown, like in Delphi, issue #31247
|
||||
|
Loading…
Reference in New Issue
Block a user