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;
in the "chat-form" following you can see the problem:
i'm calling the procedure, after text inserted of course...
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;
in the "chat-form" following you can see the problem:
i'm calling the procedure, after text inserted of course...