RichTextBox.Redo メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


Redo メソッドを使用して、最後に元に戻した操作をコントロールに再適用できます。CanRedo メソッドを使用すると、ユーザーが最後に元に戻した操作をコントロールに再適用できるかどうかを確認できます。

CanRedo プロパティと RedoActionName プロパティ、および 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からRichTextBox.Redo メソッドを検索する場合は、下記のリンクをクリックしてください。

- RichTextBox.Redo メソッドのページへのリンク