View Issue Details

IDProjectCategoryView StatusLast Update
0025556LazarusLCLpublic2014-01-19 15:18
ReporterReinier OlislagersAssigned ToBart Broersma  
Status closedResolutionfixed 
Platformx64 (with x86 compiler)OSWindows 
Product Version1.3 (SVN) 
Summary0025556: Using combobox.items.addstrings does not update combobox dropdown list
DescriptionSee attached demo program. Using items.addstrings to add string items to the combobox items leads to the items being added, but the dropdown list is kept at 1 line, instead of the number of lines set in properties.

Attached patch solves this for Win32; don't know if other widgetsets need comparable fixes.

Thanks to engkin on the forum who figured this out:,23289.msg138831.html#msg138831
TagsNo tags attached.
Fixed in Revisionr43771
Attached Files


Reinier Olislagers

2014-01-19 13:13

developer (2,926 bytes)

Reinier Olislagers

2014-01-19 13:13


combodropdownwin32.diff (1,150 bytes)   
Index: lcl/interfaces/win32/
--- lcl/interfaces/win32/	(revision 43770)
+++ lcl/interfaces/win32/	(working copy)
@@ -420,6 +420,14 @@
   SetWindowPos(FSender.Handle, 0, 0, 0, Width, Height, SWP_NOZORDER or SWP_NOACTIVATE or SWP_NOMOVE);
+procedure TWin32ComboBoxStringList.AddStrings(TheStrings: TStrings);
+  inherited AddStrings(TheStrings);
+  // Make sure dropdown etc is set correctly
+  UpdateComboHeight;
 procedure TWin32ComboBoxStringList.Clear;
   SaveText: String;
Index: lcl/interfaces/win32/
--- lcl/interfaces/win32/	(revision 43770)
+++ lcl/interfaces/win32/	(working copy)
@@ -84,6 +84,7 @@
     procedure InitFlags; override;
     procedure UpdateComboHeight;
+    procedure AddStrings(TheStrings: TStrings); override;
     procedure Assign(Source: TPersistent); override;
     procedure Clear; override;
     procedure Delete(Index: integer); override;
combodropdownwin32.diff (1,150 bytes)   

Bart Broersma

2014-01-19 14:59

developer   ~0072543

Thanks for the analysis.
Applied with slight modification.
(Assign calls AddStrings, so now the call to UpdateComboHeight isn't needed in Assign anymore.)

Issue History

Date Modified Username Field Change
2014-01-19 13:13 Reinier Olislagers New Issue
2014-01-19 13:13 Reinier Olislagers File Added:
2014-01-19 13:13 Reinier Olislagers File Added: combodropdownwin32.diff
2014-01-19 14:59 Bart Broersma Fixed in Revision => r43771
2014-01-19 14:59 Bart Broersma Note Added: 0072543
2014-01-19 14:59 Bart Broersma Status new => resolved
2014-01-19 14:59 Bart Broersma Resolution open => fixed
2014-01-19 14:59 Bart Broersma Assigned To => Bart Broersma
2014-01-19 15:18 Reinier Olislagers Status resolved => closed