Sdílet prostřednictvím


EditPoint.Delete – metoda

Odstraní zadaný rozsah textu.

Obor názvů:  EnvDTE
Sestavení:  EnvDTE (v EnvDTE.dll)

Syntaxe

'Deklarace
Sub Delete ( _
    PointOrCount As Object _
)
void Delete(
    Object PointOrCount
)
void Delete(
    [InAttribute] Object^ PointOrCount
)
abstract Delete : 
        PointOrCount:Object -> unit 
function Delete(
    PointOrCount : Object
)

Parametry

Poznámky

Pokud PointOrCount je TextPoint objektu, Delete odstraní text mezi upravit bod a PointOrCount.Pokud PointOrCount je celé číslo, pak Delete odstraní z úpravy přejděte prostřednictvím zadaný počet znaků, které následuje bod upravit přidáním jedné pro každou sekvenci předpokládané nový řádek na konci každého řádku textu.

Pokud PointOrCount je negativní, pak Delete odstraní text před bod upravit.

Příklady

Sub DeleteExample()
   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

Zabezpečení rozhraní .NET Framework

Viz také

Referenční dokumentace

EditPoint Rozhraní

EnvDTE – obor názvů