I want to make a procedure that will change the line spacing for any TDBRichViewEdit I send it.
I can call actions but some of my editors are on different forms. Is there some other way to do this?
Thanks!
Want procedure to change paragraph spacing for any Trichview
-
- Site Admin
- Posts: 17561
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17561
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Code: Select all
procedure ChangeDoc(rv: TCustomRichView);
var i: Integer;
begin
for i := 0 to rv.Style.ParaStyles.Count-1 do
begin
rv.Style.ParaStyles[i].LineSpacingType := rvlsPercent;
rv.Style.ParaStyles[i].LineSpacing := 100;
end;
for i := 0 to rv.Style.TextStyles.Count-1 do
begin
rv.Style.TextStyles[i].FontName := 'Tahoma';
rv.Style.TextStyles[i].Size := 10;
end;
end;
...
Table1.First;
while not Table1.EOF do
begin
if DBRichViewEdit1.CanChange then
begin
ChangeDoc(RichViewEdit1);
RichViewEdit1.Change;
Table1.Post;
end;
Table1.Next;
end;