Compartilhar via


Método EditPoint2.WordLeft

Move o objeto do número especificado de palavra à esquerda.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (em EnvDTE80.dll)

Sintaxe

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

Parâmetros

  • Count
    Tipo: Int32

    Opcional. Especifica a quantidade de palavras para mover o ponto de edição à esquerda da posição atual no buffer.

Comentários

WordLeft move o ponto de edição no número indicado de palavras. Se o início do documento é atingido antes de palavras de Count , o ponto permanece no início do documento.

Se o argumento for negativo, então WordLeft é executado de forma semelhante a WordRight.

Exemplos

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

Segurança do .NET Framework

Consulte também

Referência

EditPoint2 Interface

Namespace EnvDTE80