...search and select an item in a TListBox?
Author: Rainer Kümmerle
procedure TForm1.Button1Click(Sender: TObject);
var
search: string;
begin
search := 'swissdelphicenter';
if SendMessage(ListBox1.Handle, lb_selectstring, - 1, Longint(PChar(search))) <> LB_ERR then
ShowMessage('Item selected: ' + IntToStr(ListBox1.ItemIndex));
end;
printed from
www.swissdelphicenter.ch
developers knowledge base