다음을 통해 공유


RichTextBox.RedoActionName 속성

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

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Public ReadOnly Property RedoActionName As String
‘사용 방법
Dim instance As RichTextBox
Dim value As String

value = instance.RedoActionName
public string RedoActionName { get; }
public:
property String^ RedoActionName {
    String^ get ();
}
/** @property */
public String get_RedoActionName ()
public function get RedoActionName () : String

속성 값

Redo 메서드를 호출할 때 수행되는 동작의 이름을 나타내는 문자열입니다.

설명

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

예제

다음 코드 예제에서는 CanRedoRedoActionName 속성과 Redo 메서드를 사용하여 다시 실행 작업을 텍스트 삭제 이외의 모든 작업으로 제한하는 방법을 보여 줍니다. 이 예제를 실행하려면 RichTextBox 컨트롤이 포함된 폼이 있어야 하고 이 예제의 코드를 호출하기 전에 RichTextBox에서 작업을 수행한 후 실행 취소한 상태여야 합니다.

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
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:
   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.get_CanRedo() == true) {
        // Determines if the redo operation deletes text.
        if (!(richTextBox1.get_RedoActionName().Equals("Delete"))) {
            // Perform the redo.
            richTextBox1.Redo();
        }
    }
} //RedoAllButDeletes

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

RichTextBox 클래스
RichTextBox 멤버
System.Windows.Forms 네임스페이스
RichTextBox.CanRedo 속성
Redo