RichTextBox.RedoActionName 속성

정의

Redo() 메서드를 호출할 때 컨트롤에 다시 적용할 수 있는 동작의 이름을 가져옵니다.

public:
 property System::String ^ RedoActionName { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public string RedoActionName { get; }
[<System.ComponentModel.Browsable(false)>]
member this.RedoActionName : string
Public ReadOnly Property RedoActionName As String

속성 값

String

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

설명

이 속성이 빈 문자열("")을 반환하는 경우 컨트롤에 다시 적용할 수 있는 작업이 없습니다. 이 메서드를 사용하여 컨트롤에서 RichTextBox 실행 취소된 마지막 작업을 확인한 다음, 메서드를 호출 Redo 할 때 컨트롤에 다시 적용할 수 있습니다. 속성을 사용하여 CanRedo 컨트롤에 다시 적용할 작업이 있는지 여부를 확인할 수 있습니다.

적용 대상

추가 정보