Método EditPoint.CharRight

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

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

Sintaxe

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

Parâmetros

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

Comentários

CharRight move o ponto de edição à direita o número indicado de caracteres.Se o final do documento é alcançada antes de caracteres de Count , o ponto permanece no final do documento.Se o ponto de edição estiver no final de uma linha, em seguida CharRight deixa-a no início da próxima linha.Isto é, todas as seqüências de nova linha são tratadas como um único caractere.

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

Exemplos

Sub CharRightExample()
   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