TComboBox. AutoComplete problem lazarus / 31-LCL ---------------------------------------------------------------------- Renat.Su · 2021-08-11 13:14 TComboBox. AutoComplete Property is set but auto-completion does not work. The problem occurs only if the list is loaded into the component dynamically (for example, TComboBox.Items.Add('an item1')). If you manually add the elements during designtime, it works. An interesting point: all the strings that are added during the designtime are found by AutoComplete. AutoComplete doesn't work for others strings (run time added) Is there any way to solve this? Is this a feature or a bug? ---------------------------------------------------------------------- Renat.Su · 2021-08-11 16:05 Quote from: jamie on August 11, 2021, 05:53:17 pmMaybe u need to play with the sort property ? I tried ---------------------------------------------------------------------- Renat.Su · 2021-08-11 16:07 The problem was that I created the combobox on the form, which in turn was created in runtime, too. That is, if the combobox is placed in auto-created forms, then the autocomplete worked! So, my mistake was that I created this runtime form like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i TForm1.Create(Self) And correctly it is necessary so: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Application.CreateForm(TForm1, aForm) In the latter case, even on a dynamically created form, the Combobox will work as it should ---------------------------------------------------------------------- Renat.Su · 2021-08-11 16:08 So: solved