RichTextBox.Redo 메서드

정의

컨트롤에서 실행 취소한 마지막 작업을 다시 적용합니다.

public:
 void Redo();
public void Redo ();
member this.Redo : unit -> unit
Public Sub Redo ()

예제

다음 코드 예제에서는 텍스트 삭제를 제외한 모든 작업으로 다시 실행 작업을 제한하기 위해 속성 및 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 사용하여 마지막 실행 취소 작업을 컨트롤에 다시 적용할 수 있습니다. CanRedo 메서드를 사용하면 사용자가 실행 취소한 마지막 작업을 해당 컨트롤에 다시 적용할 수 있는지 여부를 결정할 수 있습니다.

적용 대상

추가 정보