Share via


EditPoint.WordLeft-Methode

Verschiebt das Objekt um die angegebene Anzahl von Wörtern nach links.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Sub WordLeft ( _
    Count As Integer _
)
void WordLeft(
    int Count
)
void WordLeft(
    [InAttribute] int Count
)
abstract WordLeft : 
        Count:int -> unit 
function WordLeft(
    Count : int
)

Parameter

  • Count
    Typ: System.Int32
    Optional.Gibt an, um wie viele Wörter der Bearbeitungspunkt von der aktuellen Position im Puffer nach links verschoben werden soll.

Hinweise

WordLeft verschiebt den Bearbeitungspunkt um die angegebene Anzahl von Wörtern nach links. Wenn der Anfang des Dokuments vor Count Wörtern erreicht wird, verbleibt der Punkt am Anfang des Dokuments.

Wenn das Argument negativ ist, dann verhält sich WordLeft wie WordRight.

Beispiele

Sub WordLeftExample()
   Dim objTextDoc As TextDocument
   Dim objEditPt As EditPoint, iCtr As Integer
        
   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")
       
   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objEditPt = objTextDoc.StartPoint.CreateEditPoint
        
   ' Insert ten lines of text.
   For iCtr = 1 To 10
     objeditpt.Insert("This is a test." & Chr(13))
   Next iCtr
       
   ' Replace the eighth word on the third line with a new word.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Delete(4)
   objEditPt.Insert("raid")
   objEditPt.WordLeft(3)
End Sub

.NET Framework-Sicherheit

Siehe auch

Referenz

EditPoint Schnittstelle

EnvDTE-Namespace