See Also

RichTextBox Class  | RichTextBox Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

SelectionProtected Property

Gets or sets a value indicating whether the current text selection is protected.

[Visual Basic]
Public Property SelectionProtected As Boolean
[C#]
public bool SelectionProtected {get; set;}

Return Type

Boolean.  True if the current text selection is protected; otherwise, false. The default value is false.

Remarks

This property will return True only if the entire selection within the control contains protected content.

Example

[C#] 

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

    if (this.rtbActiveReport.Find("Confidential") != -1) 
    { 
        this.rtbActiveReport.SelectionStart = this.rtbActiveReport.Find("Confidential"); 
        this.rtbActiveReport.SelectionLength = 12; 
        this.rtbActiveReport.SelectionProtected = true; 
    } 
}

[Visual Basic] 

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
    If Not Me.rtbActiveReport.Find("Confidential") = -1 Then
        Me.rtbActiveReport.SelectionStart = Me.rtbActiveReport.Find("Confidential")
        Me.rtbActiveReport.SelectionLength = 12
        Me.rtbActiveReport.SelectionProtected = True
    End If
End Sub

See Also

RichTextBox Class  | RichTextBox Members

 

 


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