I apologize in advance for the trivial question. Surely I'm missing some stupid thing...
I have a ListFilterEdit1 with ListFilterEdit1.FilteredListBox=TListBox. If I add strings to TListBox.Items using the object inspector editor, the filter woks well. But if I add strings in code, the filter don't works, i.e. when I type some character in the ListFilterEdit1, the listbox is always empty, with or without matches to his items.
This is my code:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
ListFilterEdit;
type
{ TForm1 }
TForm1 = class(TForm)
ListBox1: TListBox;
ListFilterEdit1: TListFilterEdit;
procedure FormShow(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
begin
ListBox1.Items.Clear;
ListBox1.Items.Add('aaa');
ListBox1.Items.Add('abb');
ListBox1.Items.Add('ccc');
end;
end.
(I'm using Lazarus 2.0.6 on Windows 8.1)