Version

Delete Method

Deletes currently selected text if possible and shifts characters accordingly.
Syntax
'Declaration
 
Public Overridable Function Delete() As Boolean
public virtual bool Delete()

Return Value

True if the operation was performed successfully.
Remarks

When you invoke this method, the control tries to delete the currently selected text and shift characters. If nothing is selected, it tries to delete the character at the current input position.

This method returns True if the operation was successful. If the operation fails because characters after the selection could not be shifted, the method returns False.

Example
Following code calls Delete method on the masked edit. Delete method emulates what hitting Delete key on the keyboard would do while masked edit had the focus.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinMaskedEdit

  Private Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button5.Click
      ' Delete method deletes selected text from the masked edit control. If there
      ' isn't any text selected, then it deletes the character where the caret
      ' is flashing.

      Me.UltraMaskedEdit1.Delete()
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinMaskedEdit;
using System.Diagnostics;

private void button5_Click(object sender, System.EventArgs e)
{
	// Delete method deletes selected text from the masked edit control. If there
	// isn't any text selected, then it deletes the character where the caret
	// is flashing.

	this.ultraMaskedEdit1.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