Share via


Metodo EditPoint2.WordLeft (Int32)

Sposta l'oggetto il numero specificato delle parole a sinistra.

Spazio dei nomi:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Sintassi

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

Parametri

  • Count
    Tipo: System.Int32
    facoltativo.Specifica il numero di parole per spostare il punto di modifica a sinistra della posizione corrente nel buffer.

Note

WordLeft sposta il punto di modifica a sinistra del numero indicato delle parole.Se all'inizio del documento viene raggiunta prima Count le parole, il punto rimane all'inizio del documento.

Se l'argomento è negativo, quindi WordLeft esegue lo stesso modo di WordRight.

Esempi

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

EditPoint2 Interfaccia

Overload WordLeft

Spazio dei nomi EnvDTE80