EditPoint2.WordRight(Int32) Método

Definição

Move o objeto de número de palavras especificado para a direita.

void WordRight(int Count = 1);
[System.Runtime.InteropServices.DispId(108)]
public void WordRight (int Count = 1);
[<System.Runtime.InteropServices.DispId(108)>]
abstract member WordRight : int -> unit
Public Sub WordRight (Optional Count As Integer = 1)

Parâmetros

Count
Int32

Opcional. Quantas palavras você deve mover o ponto de edição para a direita de sua posição atual no buffer.

Implementações

Atributos

Exemplos

Sub WordRightExample()  
   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")  
End Sub  

Comentários

Se o final do documento for atingido antes das Count palavras, o ponto permanecerá no final do documento.

Se o argumento for negativo, o será WordRight executado de forma semelhante a WordLeft .

Aplica-se a