Search and Replace problem
Posted: Fri Nov 04, 2011 1:16 pm
Hello..
i am trying to search and replace texts...but no success..
using this code :
in the "chat-form" following you can see the problem:
i'm calling the procedure, after text inserted of course...
something wrong ?
thanks alot.[/img]
i am trying to search and replace texts...but no success..
using this code :
Code: Select all
procedure SearchAndReplace(rve: TCustomRichViewEdit; old, new: String);
begin
with rve do
begin
SetSelectionBounds(0, GetOffsBeforeItem(0), 0, GetOffsBeforeItem(0));
while SearchText(old, [rvseoDown,rvseoWholeWord]) do
InsertText(new);
end;
end;
i'm calling the procedure, after text inserted of course...
something wrong ?
thanks alot.[/img]