«« Site Rescued »»

While the site is still going to move from its current host, a new site will now take its place. More Info.

The new site may have less content, but the core will now remain. And it will now play nicely with phones! Keep an eye on the DelphiDabbler Blog for news.

» 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 »