Поделиться через


EditPoint2.OutlineSection Method

Creates an outlining section based on an edit point and the given text point or value.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

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

Parameters

  • PointOrCount
    Type: System.Object
    Required. Either a TextPoint object or an integer representing the number of characters.

Implements

EditPoint.OutlineSection(Object)

Remarks

If PointOrCount is a 32-bit integer, then OutlineSection creates an outlining section in the text from an edit point to the specified number of characters following the edit point. Each implied newline character at the end of each line counts as one character.

Examples

Sub OutlineSectionExample()
   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
   objEditPt.OutLineSection(10)       
End Sub

.NET Framework Security

See Also

Reference

EditPoint2 Interface

EnvDTE80 Namespace