Udostępnij za pośrednictwem


Metoda EditPoint.OutlineSection —

Tworzy sekcji konspektu na podstawie edytowany punkt i punkt danego tekstu lub wartości.

Przestrzeń nazw:  EnvDTE
Zestaw:  EnvDTE (w EnvDTE.dll)

Składnia

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

Parametry

  • PointOrCount
    Typ: Object

    Wymagany.Albo TextPoint obiektu lub liczbę całkowitą reprezentującą liczbę znaków.

Uwagi

Jeśli PointOrCount jest 32-bitowa liczba całkowita, następnie OutlineSection tworzy konspektu sekcji w tekście z edytowany punkt na określoną liczbę znaków od edytowany punkt.Implikowane każdy znak nowego wiersza na końcu każdego wiersza liczy się jako jeden znak.

Przykłady

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

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

EditPoint Interfejs

Przestrzeń nazw EnvDTE

Inne zasoby

Porady: kompilowanie i uruchamianie kodu modelu obiektów automatyzacji — przykłady