mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 17:30:21 +02:00
preserve combobox text when changing string in list (issue #1734)
git-svn-id: trunk@9566 -
This commit is contained in:
parent
e44d2597e2
commit
aac5c510b4
@ -267,7 +267,7 @@ begin
|
||||
if lItemIndex = -1 then
|
||||
begin
|
||||
lItemIndex := SendMessage(FWin32List, FFlagGetItemIndex, 0, 0);
|
||||
lSelected := true;
|
||||
lSelected := lItemIndex >= 0;
|
||||
end;
|
||||
|
||||
inherited;
|
||||
|
@ -736,6 +736,7 @@ var
|
||||
begin
|
||||
Assert(False, Format('Trace:TWin32WSCustomComboBox.SetText --> %S', [AText]));
|
||||
Handle := AWinControl.Handle;
|
||||
Windows.SendMessage(Handle, CB_SETCURSEL, -1, 0);
|
||||
if TCustomComboBox(AWinControl).ReadOnly then
|
||||
Windows.SendMessage(Handle, CB_SELECTSTRING, -1, LPARAM(PChar(AText)))
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user