Overload | Description |
---|---|
Load | Loads a stream of Rtf, Text or Html file. |
The data loaded from the stream replaces the existing text in the RichTextBox.
To use this sample code, you will need a sample.rtf file and a sample.html file as well as two RichTextBox controls on an ActiveReport.
C# | Copy Code |
---|---|
private void Detail_Format(object sender, System.EventArgs eArgs) { System.IO.FileStream streamR = new System.IO.FileStream(System.Windows.Forms.Application.StartupPath + "\\sample.rtf", System.IO.FileMode.Open); rtfRTF.Load(streamR, RichTextType.Rtf); System.IO.FileStream streamH = new System.IO.FileStream(System.Windows.Forms.Application.StartupPath + "\\sample.html", System.IO.FileMode.Open); rtfHTML.Load(streamH, RichTextType.Html); } |
Visual Basic | Copy Code |
---|---|
Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format Dim streamR As New System.IO.FileStream(Application.StartupPath & "\sample.rtf", IO.FileMode.Open) rtfRTF.Load(streamR, RichTextType.Rtf) Dim streamH As New System.IO.FileStream(Application.StartupPath & "\sample.html", IO.FileMode.Open) rtfHTML.Load(streamH, RichTextType.Html) End Sub |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
Reference
RichTextBox ClassRichTextBox Members
ActiveReports6~GrapeCity.ActiveReports.RichTextBox~Clear
ActiveReports6~GrapeCity.ActiveReports.RichTextType