EditPoint.OutlineSection(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an outlining section based on an edit point and the given text point or value.
public:
void OutlineSection(System::Object ^ PointOrCount);
public:
void OutlineSection(Platform::Object ^ PointOrCount);
void OutlineSection(winrt::Windows::Foundation::IInspectable const & PointOrCount);
[System.Runtime.InteropServices.DispId(167)]
public void OutlineSection (object PointOrCount);
[<System.Runtime.InteropServices.DispId(167)>]
abstract member OutlineSection : obj -> unit
Public Sub OutlineSection (PointOrCount As Object)
Parameters
- PointOrCount
- Object
Required. Either a TextPoint object or an integer representing the number of characters.
- Attributes
Examples
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
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.