RichTextBox.CanRedo 속성

정의

RichTextBox에서 발생된 동작 중 다시 적용될 수 있는 동작이 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool CanRedo { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool CanRedo { get; }
[<System.ComponentModel.Browsable(false)>]
member this.CanRedo : bool
Public ReadOnly Property CanRedo As Boolean

속성 값

Boolean

컨트롤의 내용에 다시 적용할 수 있는 실행 취소된 작업이 있으면 true이고, 그렇지 않으면 false입니다.

특성

예제

다음 코드 예제에서는 다시 실행 작업을 텍스트 삭제를 제외한 모든 작업으로 제한하기 위해 속성 및 Redo 메서드를 사용하는 CanRedo RedoActionName 방법을 보여 줍니다. 이 예제에서는 컨트롤을 포함하는 RichTextBox 폼이 있어야 하며 이 예제의 RichTextBox 코드가 호출되기 전에 컨트롤 내의 작업이 수행되고 실행 취소되어야 합니다.

private:
   void RedoAllButDeletes()
   {
      // Determines if a Redo operation can be performed.
      if ( richTextBox1->CanRedo == true )
      {
         // Determines if the redo operation deletes text.
         if (  !richTextBox1->RedoActionName->Equals( "Delete" ) )
         // Perform the redo.
         richTextBox1->Redo();
      }
   }
private void RedoAllButDeletes()
{
    // Determines if a Redo operation can be performed.
    if(richTextBox1.CanRedo == true)
    {
        // Determines if the redo operation deletes text.
        if (richTextBox1.RedoActionName != "Delete")
            // Perform the redo.
            richTextBox1.Redo();
    }
}
Private Sub RedoAllButDeletes()

    ' Determines if a Redo operation can be performed.
    If richTextBox1.CanRedo = True Then
        ' Determines if the redo operation deletes text.
        If richTextBox1.RedoActionName <> "Delete" Then
            ' Perform the redo.
            richTextBox1.Redo()
        End If
    End If
End Sub

설명

이 속성을 사용하여 메서드를 사용하여 Redo 마지막 작업 실행 취소를 RichTextBox 다시 적용할 수 있는지 여부를 확인할 수 있습니다.

적용 대상

추가 정보