Partager via


EditPoint.OutlineSection, méthode

Crée une section en mode Plan basée sur un point d'édition et sur le point de texte ou la valeur donnés.

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

Syntaxe

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

Paramètres

  • PointOrCount
    Type : Object

    Requis. Objet TextPoint ou entier qui représente le nombre de caractères.

Notes

Si PointOrCount est un entier de 32 bits, OutlineSection crée une section en mode Plan dans le texte à partir d'un point d'édition jusqu'au nombre spécifié de caractères après ce point. Chaque caractère de saut de ligne impliqué en fin de ligne compte pour un caractère.

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

EditPoint Interface

EnvDTE, espace de noms

Autres ressources

Comment : compiler et exécuter les exemples de code du modèle objet Automation