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( ); }
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