Version

Cut Method (FormattedTextEditInfo)

Performs a Cut operation on the selected content. Cut operation involves copying the selected contents into the clipboard and then deleting them.
Syntax
'Declaration
 
Public Function Cut() As Boolean
public bool Cut()

Return Value

Returns a value indicating whether the Cut operation succeeded.
Example
The following code demonstrates usage of some of the edit operations via method calls.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.Misc
Imports Infragistics.Win.FormattedLinkLabel

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
        Dim editInfo As FormattedTextEditInfo = Me.UltraFormattedTextEditor1.EditInfo

        ' Set some test value.
        Me.UltraFormattedTextEditor1.Value = "TEST"

        ' Select all of the contents.
        editInfo.SelectAll()

        ' Copy the contents.
        editInfo.Copy()

        ' Unselect and set the caret in the beginning.
        editInfo.SelectionStart = 0
        editInfo.SelectionLength = 0

        ' Paste the copied value. This will essentially duplicate the initial value.
        editInfo.Paste()

        ' Select first character.
        editInfo.SelectionStart = 0
        editInfo.SelectionLength = 1

        ' Delete the selected content.
        editInfo.Delete()
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.Misc;
using Infragistics.Win.FormattedLinkLabel;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			FormattedTextEditInfo editInfo = this.ultraFormattedTextEditor1.EditInfo;

			// Set some test value.
			this.ultraFormattedTextEditor1.Value = "TEST";

			// Select all of the contents.
			editInfo.SelectAll( );

			// Copy the contents.
			editInfo.Copy( );

			// Unselect and set the caret in the beginning.
			editInfo.SelectionStart = 0;
			editInfo.SelectionLength = 0;

			// Paste the copied value. This will essentially duplicate the initial value.
			editInfo.Paste( );

			// Select first character.
			editInfo.SelectionStart = 0;
			editInfo.SelectionLength = 1;

			// Delete the selected content.
			editInfo.Delete( );
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also