preserve combobox text when changing string in list (issue #1734)

git-svn-id: trunk@9566 -
This commit is contained in:
micha 2006-07-05 20:31:49 +00:00
parent e44d2597e2
commit aac5c510b4
2 changed files with 2 additions and 1 deletions

View File

@ -267,7 +267,7 @@ begin
if lItemIndex = -1 then
begin
lItemIndex := SendMessage(FWin32List, FFlagGetItemIndex, 0, 0);
lSelected := true;
lSelected := lItemIndex >= 0;
end;
inherited;

View File

@ -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