Metodo EditPoint.CharRight

Sposta il punto di modifica a destra del numero di caratteri specificato.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

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

Parametri

  • Count
    Tipo: System.Int32
    Opzionale.Il numero di caratteri di cui spostarsi verso destra.Il valore predefinito è un carattere.

Note

CharRight sposta il punto di modifica a destra del numero di caratteri indicato.Se si raggiunge la fine del documento prima dei caratteri specificati da Count, il punto rimane alla fine del documento.Se il punto di modifica si trova alla fine di una riga, CharRight lo lascia all'inizio della riga successiva.Questo significa che tutte le sequenze di nuove righe verranno trattate come caratteri singoli.

Se il valore di Count è negativo, il metodo CharRight avrà lo stesso comportamento del metodo CharLeft.

Esempi

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

EditPoint Interfaccia

Spazio dei nomi EnvDTE