mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 09:00:33 +02:00
LCL: ComboBox: Win32: Don't loose ItemIndex with AutoComplete set. Issue #32301
git-svn-id: branches/fixes_1_8@55706 -
This commit is contained in:
parent
a1d014b662
commit
8c4eda4980
@ -1103,6 +1103,7 @@ class procedure TWin32WSCustomComboBox.SetDroppedDown(
|
||||
var
|
||||
aSelStart, aSelLength: Integer;
|
||||
aText: string;
|
||||
OldItemIndex: Integer;
|
||||
begin
|
||||
if WSCheckHandleAllocated(ACustomComboBox, 'TWin32WSCustomComboBox.SetDroppedDown') then
|
||||
begin
|
||||
@ -1111,7 +1112,9 @@ begin
|
||||
aSelStart := GetSelStart(ACustomComboBox);
|
||||
aSelLength := GetSelLength(ACustomComboBox);
|
||||
|
||||
OldItemIndex := GetItemIndex(ACustomComboBox);
|
||||
SendMessage(ACustomComboBox.Handle, CB_SHOWDROPDOWN, WPARAM(ADroppedDown), 0);
|
||||
SetItemIndex(ACustomComboBox, OldItemIndex);
|
||||
|
||||
SetText(ACustomComboBox, aText);
|
||||
SetSelStart(ACustomComboBox, aSelStart);
|
||||
|
Loading…
Reference in New Issue
Block a user