Hi,
I am creating TRichview component at run time. What is the equivalent of RichEdit.DefAttributes, so that when a user starts editing the component will use, for example, font Tahoma size 12?
Thanks
Luican
Equivalent to RichEdit DefAttributes
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
So, when implementing a New command, you can add a code like this:
Code: Select all
RVStyle1.TextStyles.Clear;
with RVStyle1.TextStyles.Add do begin
FontName := 'Tahoma';
Size := 12;
end;
RVStyle1.ParaStyles.Clear;
RVStyle1.ParaStyles.Add; // you can specify default paragraph properties here too
RVStyle1.ListStyles.Clear;