Hello,
I need to implement the following scenario in ScaleRichViewEdit:
1.The user opens an rvf document
2.The document can contain many TextStyles, but one of them is called "BasicStyle"
3.The user chooses a RichText file to import
4. I need to import it in the ScaleRichView (SRichViewEdit1.RichViewEdit.LoadRTF)
5.I need to format the imported text with "BasicStyle" text style.
- I don't know how to find a text style by name. The ApplyTextStyle has an Integer parameter but the order of the "BasicStyle" can vary time to time
- I also don't know how to apply the style to the imported Rtf text
Can you help me? Thank you very much in advance
How to format the imported rtf?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Code: Select all
StyleNo := -1;
for i := 0 to SRichViewEdit.RichViewEdit.Style.TextStyles.Count-1 do
if SRichViewEdit.RichViewEdit.Style.TextStyles[i].StyleName = 'BasicStyle' then begin
StyleNo := i;
exit;
end;
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: