EditPoint.WordLeft, méthode

Déplace l'objet du nombre spécifié de mots vers la gauche.

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

Syntaxe

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

Paramètres

  • Count
    Type : System.Int32
    Facultatif.Spécifie le nombre de mots dont se déplace le point d'édition à gauche de son emplacement en cours dans le tampon.

Notes

WordLeft déplace le point d'édition du nombre spécifié de mots vers la gauche. Si le début du document est atteint avant les Count mots, le point d'édition reste au début du document.

Si l'argument est négatif, WordLeft agit comme WordRight.

Exemples

Sub WordLeftExample()
   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
       
   ' Replace the eighth word on the third line with a new word.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Delete(4)
   objEditPt.Insert("raid")
   objEditPt.WordLeft(3)
End Sub

Sécurité .NET Framework

Voir aussi

Référence

EditPoint Interface

EnvDTE, espace de noms