Método EditPoint.WordLeft

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

Namespace:  EnvDTE
Assembly:  EnvDTE (em EnvDTE.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: System.Int32
    Opcional.Especifica quantas palavra para mover o ponto de edição à esquerda do seu posição atual no buffer.

Comentários

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

Se o argumento for negativo, então WordLeft executa a mesma forma 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

EditPoint Interface

Namespace EnvDTE