I want to text replace only arial font
how can I make
my code (all text arial, bad)
with Srv.RichViewEdit do
for i :=0 to Srv.RichViewEdit.style.TextStyles.Count-1 do
Srv.RichViewEdit.Style.TextStyles.FontName := 'Arial';
Srv.RichViewEdit.Format;
begin
APPLICATION.ProcessMessages;
stringReplace('orange', 'aplle');
replace for only arial font text
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If it should be an editing operation (undone):
Code: Select all
with RichViewEdit1 do begin
SetSelectionBounds(0, GetOffsBeforeItem(0), 0, GetOffsBeforeItem(0));
while SearchText('orange', [rvseoDown]) do
if CompareText(Style.TextStyles[CurTextStyleNo].FontName, 'Arial')=0 then
InsertText('apple');
end;