See Also

RichTextBox Members  | DataDynamics.ActiveReports Namespace

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

RichTextBox Class

Prints text formatted as Rich Text (RTF) on the report.

For a list of all members of this type, see RichTextBox members.

Object Model


Inheritance Hierarchy

System.Object
   DataDynamics.ActiveReports.ARControl
      DataDynamics.ActiveReports.RichTextBox

Syntax

[Visual Basic]
Public NotInheritable Class RichTextBox    Inherits ARControl
[C#]
public sealed class RichTextBox : ARControl

Example

[C#] 

private void ghCustomerID_Format(object sender, System.EventArgs eArgs) 

    this.rtf.BackColor = System.Drawing.Color.RosyBrown; 
    this.rtf.BulletIndent = 0.5f; 
    this.rtf.CanGrow = true; 
    this.rtf.CanShrink = false; 
    this.rtf.Clear(); //Clears the content of the RichTextBox; 
    this.rtf.Find("Germany"); 
    this.rtf.ForeColor = System.Drawing.Color.Black; 
    this.rtf.InsertField("Phone"); 
    this.rtf.LoadFile(System.Windows.Forms.Application.StartupPath + " \\Letter.rtf"); //Loads the specified file into the RTF control         
    this.rtf.MaxLength = 0; 
    this.rtf.Multiline = True; 
    this.rtf.RTF = "RTF Contents"; 
    this.rtf.SelectedText.ToString(); 
    this.rtf.SelectionAlignment = TextAlignment.Left; 
    this.rtf.SelectionBackColor = System.Drawing.Color.RosyBrown; 
    this.rtf.SelectionBullet = False; 
    this.rtf.SelectionCharOffset = 0; 
    this.rtf.SelectionColor = System.Drawing.Color.Blue; 
    this.rtf.SelectionFont.ToString(); 
    this.rtf.SelectionHangingIndent = 3; 
    this.rtf.SelectionIndent = 0; 
    this.rtf.SelectionLength.ToString(); 
    this.rtf.SelectionProtected = False; 
    this.rtf.SelectionRightIndent = 3; 
    this.rtf.SelectionStart = 5; 
    this.rtf.Text = "RTF Text"; 
}

[Visual Basic] 

Private Sub ghCustomerID_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles ghCustomerID.Format
    Me.rtf.BackColor = System.Drawing.Color.RosyBrown
    Me.rtf.BulletIndent = 0.5
    Me.rtf.CanGrow = True
    Me.rtf.CanShrink = False
    Me.rtf.Clear() 'Clears the content of the RichTextBox
    Me.rtf.Find("Germany")
    Me.rtf.ForeColor = System.Drawing.Color.Black
    Me.rtf.InsertField("Phone")
    Me.rtf.LoadFile(Application.StartupPath + " \Letter.rtf") 'Loads the specified file into the RTF control
    Me.rtf.MaxLength = 0
    Me.rtf.Multiline = True
    Me.rtf.RTF = "RTF Contents"
    Me.rtf.SelectedText.ToString()
    Me.rtf.SelectionAlignment = TextAlignment.Left
    Me.rtf.SelectionBackColor = System.Drawing.Color.RosyBrown
    Me.rtf.SelectionBullet = False
    Me.rtf.SelectionCharOffset = 0
    Me.rtf.SelectionColor = System.Drawing.Color.Blue
    Me.rtf.SelectionFont.ToString()
    Me.rtf.SelectionHangingIndent = 3
    Me.rtf.SelectionIndent = 0
    Me.rtf.SelectionLength.ToString()
    Me.rtf.SelectionProtected = False
    Me.rtf.SelectionRightIndent = 3
    Me.rtf.SelectionStart = 5
    Me.rtf.Text = "RTF Text"
End Sub

See Also

RichTextBox Members  | DataDynamics.ActiveReports Namespace

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.