EditPoint.OutlineSection メソッド

更新 : 2007 年 11 月

エディット ポイントと、指定したテキスト ポイントまたは値を基にして、アウトライン セクションを作成します。

名前空間 :  EnvDTE
アセンブリ :  EnvDTE (EnvDTE.dll 内)

構文

'宣言
Sub OutlineSection ( _
    PointOrCount As Object _
)
'使用
Dim instance As EditPoint
Dim PointOrCount As Object

instance.OutlineSection(PointOrCount)
void OutlineSection(
    Object PointOrCount
)
void OutlineSection(
    [InAttribute] Object^ PointOrCount
)
function OutlineSection(
    PointOrCount : Object
)

パラメータ

  • PointOrCount
    型 : System.Object

    必ず指定します。TextPoint オブジェクト、または文字数を表す整数。

解説

PointOrCount が 32 ビットの整数の場合、OutlineSection は、エディット ポイントからエディット ポイントの後に続く指定した文字数のテキストにアウトライン セクションを作成します。各行の末尾で暗黙的に指定される改行文字は、1 文字としてカウントされます。

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

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

EditPoint インターフェイス

EditPoint メンバ

EnvDTE 名前空間

その他の技術情報

方法 : オートメーション オブジェクト モデルのコード例をコンパイルおよび実行する