EditPoint.CharRight, méthode

Déplace le point d'édition du nombre spécifié de caractères vers la droite.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

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

Paramètres

  • Count
    Type : System.Int32
    Facultatif.Nombre de caractères spécifiant l'importance du déplacement vers la droite.La valeur par défaut est 1 caractère.

Notes

CharRight déplace le point d'édition du nombre spécifié de caractères vers la droite. Si la fin du document est atteinte avant les Count caractères, le point reste à la fin du document. Si le point d'édition est à la fin d'une ligne, CharRight le laisse au début de la ligne suivante. Autrement dit, toutes les séquences de saut de ligne sont traitées comme un caractère unique.

Si la valeur de Count est négative, CharRight agit comme la méthode CharLeft.

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

EditPoint Interface

EnvDTE, espace de noms