Hi,
How do i change the text style (font name, bold, italics..) of text in a table item?
Let me explain the flow:
I will first insert an rtf text into a cell in a table using LoadRTFFromStream:
l_RVTableItemInfo.Cells[0, 0].LoadRTFFromStream(l_Stream);
The rtf text contain unicode characters, and as such, i need to set the RTFReadProperties.TextStyleMode to rvrsAddIfNeeded. If not, the text displayed will be in funny characters
Then what i need to do is to remove all text formatting that is contained in the rtf text i just inserted. So how do i do that? Is there a function similar to SetParagraphStyleToAll. Is there a way for me to change the text style for the table item? Thanks
Setting text style to selected text in a table/cell
-
- Posts: 5
- Joined: Thu Feb 08, 2007 12:50 am
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
What do you mean be removing all formatting? Assigning the same text style to all loaded text?
May be you can do it on RTF loading.
Try the following settings:
1) Create Unicode text style;
2) RichViewEdit1.RTFReadProperties.UnicodeMode := rvruOnlyUnicode;
3) RichViewEdit1.RTFReadProperties.TextStyleMode := rvrsUseSpecified;
4) RichViewEdit1.RTFReadProperties.TextStyleNo := index of text style created on the Step 1.
Since the import will be in Unicode mode, funny characters must not appear.
May be you can do it on RTF loading.
Try the following settings:
1) Create Unicode text style;
2) RichViewEdit1.RTFReadProperties.UnicodeMode := rvruOnlyUnicode;
3) RichViewEdit1.RTFReadProperties.TextStyleMode := rvrsUseSpecified;
4) RichViewEdit1.RTFReadProperties.TextStyleNo := index of text style created on the Step 1.
Since the import will be in Unicode mode, funny characters must not appear.
-
- Posts: 5
- Joined: Thu Feb 08, 2007 12:50 am