Metodo EditPoint.OutlineSection

Crea una sezione di struttura in base a un punto di modifica e al punto di inserimento o valore specificato.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

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

Parametri

  • PointOrCount
    Tipo: System.Object
    Necessario.Oggetto TextPoint o intero che rappresenta il numero di caratteri.

Note

Se PointOrCount è un intero a 32 bit, il metodo OutlineSection crea una sezione di struttura nel testo a partire da un punto di modifica per il numero specificato di caratteri dopo il punto di modifica.Ogni carattere implicito di nuova riga alla fine di ogni riga viene considerato come un singolo carattere.

Esempi

Sub OutlineSectionExample()
    ' Creates a text document with some text,
    ' and then puts the first two lines into
    ' outline view.
    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
    ' Go to top of document and outline the first
    ' 31 characters (the first two lines).
    objEditPt.StartOfDocument()
    objEditPt.OutlineSection(31)
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

EditPoint Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione