mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 23:30:30 +02:00
LCL/Combobox: Fix hehavior when ESC or ENTER are pressed in dropped-down state. Issue #37674. Patch by jamie philbrook.
git-svn-id: trunk@63903 -
This commit is contained in:
parent
6c19136b97
commit
39f9890864
@ -1200,7 +1200,7 @@ class procedure TWin32WSCustomComboBox.SetDroppedDown(
|
||||
const ACustomComboBox: TCustomComboBox; ADroppedDown: Boolean);
|
||||
var
|
||||
aSelStart, aSelLength: Integer;
|
||||
aText: string;
|
||||
aText: string = '';
|
||||
Editable: Boolean;
|
||||
OldItemIndex: Integer;
|
||||
begin
|
||||
@ -1217,7 +1217,8 @@ begin
|
||||
|
||||
OldItemIndex := GetItemIndex(ACustomComboBox);
|
||||
SendMessage(ACustomComboBox.Handle, CB_SHOWDROPDOWN, WPARAM(ADroppedDown), 0);
|
||||
SetItemIndex(ACustomComboBox, OldItemIndex);
|
||||
if GetKeyState(VK_RETURN) < 0 then
|
||||
SetItemIndex(ACustomComboBox, OldItemIndex);
|
||||
|
||||
if Editable then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user