Notice Of Closure

Please note that this website is due to close down on 15th June 2020.

In the interim I will try to move as much content as possible over to my GitHub account. Thanks to everyone who has supported the site over the years.

» Help

Incremental search of list box


The following code implements incremental search of list box using text typed into edit control.

procedure TListBoxSearchForm.Edit1Change(Sender: TObject) ;
  indexStart = -1;
  search : array[0..128] of Char;
  //make sure Length(Edit1.Text) <= 128
  StrPCopy(search, Edit1.Text) ;
  ListBox1.ItemIndex := ListBox1.Perform(
    LB_SELECTSTRING, indexStart, LongInt(@search)
Author: Unknown
Added: 2007-06-02
Last updated: 2007-06-02

« Return to contents »