Udostępnij za pośrednictwem


Metoda EditPoint2.WordLeft — (Int32)

Przesuwa obiekt określona liczba wyrazów w lewo.

Przestrzeń nazw:  EnvDTE80
Zestaw:  EnvDTE80 (w EnvDTE80.dll)

Składnia

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

Parametry

  • Count
    Typ: System.Int32
    Opcjonalne.Określa, ile wyrazów, aby przenieść Edycja wskaż na lewo od bieżącej pozycji w buforze.

Uwagi

WordLeftPrzesuwa punkt edycji do lewej jako wskazaną liczbę wyrazów.Jeśli na początku dokumentu zostanie osiągnięty przed Count wyrazy, punkt pozostaje na początku dokumentu.

Jeśli argument jest ujemna, następnie WordLeft wykonuje się podobnie do WordRight.

Przykłady

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

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

EditPoint2 Interfejs

Przeciążenie WordLeft

Przestrzeń nazw EnvDTE80