Adds a text string to the current paragraph content.
Namespace:
C1.C1PreviewAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
public ParagraphText AddText( string text ) |
Visual Basic |
---|
Public Function AddText ( _ text As String _ ) As ParagraphText |
Parameters
- text
- Type: System..::..String
The text string to add.
Return Value
A ParagraphText object representing the specified text string.Remarks
This method creates a ParagraphText,
initializes it with the specified text, and adds it
to the current collection.
Examples
The following example adds a string of text to the current paragraph:
Copy CodeVisual Basic
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MakeDoc(C1PrintDocument1) C1PrintDocument1.Generate() End Sub Private Sub MakeDoc(ByVal doc As C1.C1Preview.C1PrintDocument) Dim rp As New C1.C1Preview.RenderParagraph() rp.Content.AddText("ComponentOne Preview for WinForms adds previewing, formatting, printing, and exporting to your applications. It is the most unique solution available to provide dynamic and flexible previewing, formatting, printing, and exporting capabilities to your .NET applications. Preview for WinForms 2.0 includes 7 powerful components that provide for a simple and efficient design-time experience.") doc.Body.Children.Add(rp) End Sub |
Copy CodeC#
private void Form1_Load(object sender, EventArgs e) { MakeDoc(c1PrintDocument1); c1PrintDocument1.Generate(); } private void MakeDoc(C1.C1Preview.C1PrintDocument doc) { C1.C1Preview.RenderParagraph rp = new C1.C1Preview.RenderParagraph(); rp.Content.AddText("ComponentOne Preview for WinForms adds previewing, formatting, printing, and exporting to your applications. It is the most unique solution available to provide dynamic and flexible previewing, formatting, printing, and exporting capabilities to your .NET applications. Preview for WinForms 2.0 includes 7 powerful components that provide for a simple and efficient design-time experience."); doc.Body.Children.Add(rp); } |