Método EditPoint.CharLeft

Move o ponto de edição o número especificado de caracteres à esquerda.

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

Sintaxe

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

Parâmetros

  • Count
    Tipo: System.Int32
    Opcional.O número de caracteres para mover para a esquerda.O padrão é 1 caracteres.

Comentários

CharLeft move o ponto de edição deixa o número indicado de caracteres.Se o início do documento é alcançado antes que o número indicado de caracteres, o cursor permanecer no início do documento.Se o ponto de edição está no início de uma linha, então CharLeft deixa-a no final da linha anterior.Isto é, todas as seqüências de nova linha são tratadas como um único caractere.

Se o valor de Count for negativo, então CharLeft executa idêntica ao método de CharRight .

Exemplos

Sub CharLeftExample()
   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
        
   ' Change the first letter of the fourth word of the fourth line.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.CharRight(2)
   objEditPt.CharLeft(2)
   objeditpt.Delete(1)
   objEditPt.Insert("p")
End Sub

Segurança do .NET Framework

Consulte também

Referência

EditPoint Interface

Namespace EnvDTE