StyledText.RTFData

From Xojo Documentation

Property (As String )
aStyledText.RTFData = newStringValue
or
StringValue = aStyledText.RTFData

New in 2007r4

Supported for all project types and targets.

The styled text managed by the StyledText object in RTF format.

Notes

This property supports cross-platform RTF generation and parsing. The RTF parser supports only the features found in the StyledText class.

Examples

This example saves as RTF using the code snippet after the method that creates the StyleRuns.

Var f As FolderItem = FolderItem.ShowSaveFileDialog(TextTypes.TextRtf, "TestSaveRTF")
If f <> Nil Then
Var s As TextOutputStream=TextOutputStream.Create(f)
s.Write(TextArea1.StyledText.RTFData)
s.Close
End If