From a7c0eda8658c630cbc7e8c750f3bae5f3d111289 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 1 Feb 2009 09:54:56 +0000 Subject: [PATCH] win32: save and restore combobox text if we clear combobox items and combobox is not readonly (bug #0009736) git-svn-id: trunk@18527 - --- lcl/interfaces/win32/win32listsl.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lcl/interfaces/win32/win32listsl.inc b/lcl/interfaces/win32/win32listsl.inc index fa30c83b41..01711bfe38 100644 --- a/lcl/interfaces/win32/win32listsl.inc +++ b/lcl/interfaces/win32/win32listsl.inc @@ -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);