can anybody help?
How do I search for all instances of a string in a RichEdit containing 10000 records, using a FindDialog, then copy the whole line of each instance of the string into a new Richedit for display.
Thanks a lot for your reply, sorry for taking so long to get back.
Anyway I used your suggestion and ended up using the code below so that case sensitivity was nill. I am unable to set the find dialog to recognise case sensitive options but that is a minor gliche at the moment.
Thanks again for your help.
var
Line, Count :integer;
TextFound, StringValue, UpperStringValue :string;
begin
Line := 0;
Count := 0;
with RichEdit1 do
TextFound := UpperCase(FindDialog1.FindText);
While line < RichEdit1.Lines.Count do
Begin
StringValue := RichEdit1.Lines[Line];
inc (Line);
UpperStringValue := UpperCase (StringValue);
If Pos(TextFound, UpperStringValue) <> 0 then
Begin
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.