Answer the question
In order to leave comments, you need to log in
How to pass text to ListView search bar?
There is a ListView with a built-in search string.
How can I insert arbitrary text into this line?
For example: "Enter a query..." or load text from the Memo field.
Answer the question
In order to leave comments, you need to log in
procedure TForm4.Button2Click(Sender: TObject);
var
LItem: TListViewItem;
I: Integer;
begin
for I := 1 to 10 do
begin
LItem := ListView1.Items.Add;
LItem.Text := 'Test' + IntToStr(I);
end;
end;
procedure TForm4.Button1Click(Sender: TObject);
var I: Integer;
begin
for I := 0 to ListView1.Controls.Count-1 do
if ListView1.Controls[I] is TSearchBox then
begin
TSearchBox(ListView1.Controls[I]).Text := 'Test5';
end;
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question