ActiveReports Developer 7
RichTextBox Class
Members  Example  See Also 
GrapeCity.ActiveReports.v7 Assembly > GrapeCity.ActiveReports.SectionReportModel Namespace : RichTextBox Class

Glossary Item Box

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

Object Model

RichTextBox Class

Syntax

Visual Basic (Declaration) 
Public NotInheritable Class RichTextBox 
   Inherits ARControl
C# 
public sealed class RichTextBox : ARControl 

Example

C#Copy Code
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.SelectionRightIndent = 3;
    this.rtf.SelectionStart = 5;
    this.rtf.Text = "RTF Text";
}
Visual BasicCopy Code
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.SelectionRightIndent = 3
    Me.rtf.SelectionStart = 5
    Me.rtf.Text = "RTF Text"
End Sub

Inheritance Hierarchy

System.Object
   GrapeCity.ActiveReports.SectionReportModel.ARControl
      GrapeCity.ActiveReports.SectionReportModel.RichTextBox

See Also