Share via


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() メソッドが呼び出された場合に実行されるアクションの名前を表す文字列。

属性

次のコード例では、プロパティとRedoActionNameメソッドをCanRedo使用して、やり直しRedo操作をテキストの削除以外のアクションに制限する方法を示します。 この例では、コントロールを含む 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 、コントロールに再適用する操作があるかどうかを判断できます。

適用対象

こちらもご覧ください