TextSelection.DeleteLeft(Int32) Methode

Definition

Löscht eine angegebene Anzahl von Zeichen links vom aktiven Punkt.

void DeleteLeft(int Count = 1);
[System.Runtime.InteropServices.DispId(24)]
public void DeleteLeft (int Count = 1);
[<System.Runtime.InteropServices.DispId(24)>]
abstract member DeleteLeft : int -> unit
Public Sub DeleteLeft (Optional Count As Integer = 1)

Parameter

Count
Int32

(Optional) Stellt die Anzahl der zu löschenden Zeichen dar.

Attribute

Beispiele

Public objSel As TextSelection = DTE.ActiveDocument.Selection  

Sub DeleteLeftExample()  
   ' Before running this example, open a text document.  
   ' Perform operations on the text.  
   objSel.StartOfDocument(False)  
   Position(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn, 4)  
   objSel.Copy()  
   Position(vsStartOfLineOptions.vsStartOfLineOptionsFirstText, 4)  
   objSel.Cut()  
   Position(vsStartOfLineOptions.vsStartOfLineOptionsFirstText, 4)  
   objSel.Delete()  
   Position(vsStartOfLineOptions.vsStartOfLineOptionsFirstText, 4)  
   objSel.DeleteLeft(6)  
   objSel.DestructiveInsert("NEW TEXT")  
End Sub  

Sub Position(ByVal pos As vsStartOfLineOptions, ByVal ipos As Integer)  
   ' Moves the insertion point down to the beginning of the next line,   
   ' and then highlights the right-most four characters.  
   objSel.LineDown()  
   objSel.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)  
   objSel.CharRight(True, 4)  
End Sub  

Hinweise

Wenn die Textauswahl leer ist, wird DeleteLeft die Anzahl der Zeichen links vom aktiven Endpunkt gelöscht. Wenn der Wert von Count negativ ist, dann DeleteLeft verhält sich wie die- Delete Methode.

Gilt für