LazControls

From Free Pascal wiki
Jump to navigationJump to search

LazControls is a set of controls that are often used in Lazarus.

FilterEdit controls

Controls inherited from TCustomControlFilterEdit provide a filtering edit box connected to a container control. Currently there filters for TListBox and TTreeView implemented. When the container control is connected to the filter control, the filtering happens automatically as a user enters text. There are some common properties that control the behavior:

  • property OnFilterItem
  • property OnCheckItem
  • property UseFormActivate

TListFilterEdit

This is a control that can easily filter a ListBox.

Once property TListFilterEdit.FilteredListBox is assigned then TListFilterEdit makes copy of ListBox.Items and works with it. If you add ListBox.Items.Add later, then these data does not appear in TListFilterEdit.

You should do always:

TListFilterEdit.FilteredListBox:=nil;
//Add data to ListBox
TListFilterEdit.FilteredListBox:=ListBox;