win32: save and restore combobox text if we clear combobox items and combobox is not readonly (bug #0009736)

git-svn-id: trunk@18527 -
This commit is contained in:
paul 2009-02-01 09:54:56 +00:00
parent 2e44efcd0b
commit a7c0eda865

View File

@ -407,9 +407,15 @@ begin
end;
procedure TWin32ComboBoxStringList.Clear;
var
SaveText: String;
begin
if not TCustomComboBox(FSender).ReadOnly then
SaveText := TCustomComboBox(FSender).Text;
inherited;
UpdateComboHeight;
if not TCustomComboBox(FSender).ReadOnly then
TCustomComboBox(FSender).Text := SaveText;
end;
procedure TWin32ComboBoxStringList.Delete(Index: integer);