PowerTools ActiveReports for .NET 11.0J
SelectionLength プロパティ
使用例 

コントロール内で選択されている文字の数を取得または設定します。
構文
'宣言
 
Public Property SelectionLength As Integer
public int SelectionLength {get; set;}

プロパティ値

テキストボックス内で選択されている文字の数。

解説

このプロパティを使用すると、選択されたテキストに対して操作を実行する前に、テキストボックスコントロールで文字が選択されているかどうかを判断できます。

使用例
private void detail_Format(object sender, System.EventArgs eArgs)
{
    if (this.rtbActiveReport.Find("List") != -1)
    {
        this.rtbActiveReport.SelectionStart = this.rtbActiveReport.Find("List");
        this.rtbActiveReport.SelectionLength = 4;
        this.rtbActiveReport.SelectionIndent = 0.5f;
    }
}
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
    If Not Me.rtbActiveReport.Find("List") = -1 Then
        Me.rtbActiveReport.SelectionStart = Me.rtbActiveReport.Find("List")
        Me.rtbActiveReport.SelectionLength = 4
        Me.rtbActiveReport.SelectionIndent = 0.5
    End If
End Sub
参照

関連項目

RichTextBox クラス
RichTextBox メンバ
SelectionStart プロパティ

 

 


©2003-2017 GrapeCity inc. All rights reserved.