Método EditPoint2.CharRight (Int32)

Move a edição aponte o número especificado de caracteres para a direita.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (em EnvDTE80.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

CharRightMove o ponto de edição à direita o número indicado de caracteres.Se o final do documento for atingido antes de Count o ponto de caracteres, permanecerá no final do documento.Se o ponto de edição está no final de uma linha, em seguida, CharRight deixa-a no início da próxima linha.Ou seja, todas as seqüências de nova linha são tratadas como um único caractere.

Se o valor de Count for negativo, em seguida, a CharRight método executa de forma idêntica para CharLeft método.

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

EditPoint2 Interface

Sobrecargas CharRight

Namespace EnvDTE80