مشاركة عبر


EditPoint2.PadToColumn أسلوب (Int32)

Fills the السطر الحالي في the احتياطي مع فارغ حرف/ حروف (أبيض مسافة) إلى the given عمود.

مساحة الاسم:  EnvDTE80
التجميع:  EnvDTE80 (في EnvDTE80.dll)

بناء الجملة

'إقرار
Sub PadToColumn ( _
    Column As Integer _
)
void PadToColumn(
    int Column
)
void PadToColumn(
    [InAttribute] int Column
)
abstract PadToColumn : 
        Column:int -> unit 
function PadToColumn(
    Column : int
)

المعلمات

  • Column
    النوع: System.Int32
    مطلوبة.The عدد أعمدة إلى pad, البدء at واحد.

التطبيقات

EditPoint.PadToColumn(Int32)

ملاحظات

PadToColumn inserts علامات التبويب و مسافات, according إلى عمومي إعدادات, من the تحرير يؤشر's أو تحديد's عرض عمود إلى the specified عرض عمود. If the تحرير يؤشر أو نشط إنهاء of the تحديد already lies beyond the specified عمود, PadToColumn does لا شيء.

أمثلة

Sub PadToColumnExample(ByVal dte As DTE2)

    ' Create a new text file.
    dte.ItemOperations.NewFile()

    ' Create an EditPoint at the start of the new file.
    Dim doc As TextDocument = _
        CType(dte.ActiveDocument.Object("TextDocument"), TextDocument)
    Dim point As EditPoint = doc.StartPoint.CreateEditPoint
    Dim i As Integer

    ' Insert ten lines of text.
    For i = 1 To 10
        point.Insert("This is a test." & vbCrLf)
    Next i

    point.StartOfDocument()

    ' Indent text to column 10.
    For i = 1 To 10
        point.PadToColumn(10)
        point.LineDown()
        point.StartOfLine()
    Next

End Sub
public void PadToColumnExample(DTE2 dte)
{
    // Create a new text file.
    dte.ItemOperations.NewFile(@"General\Text File", "", 
        Constants.vsViewKindPrimary);

    // Create an EditPoint at the start of the new file.
    TextDocument doc = 
        (TextDocument)dte.ActiveDocument.Object("TextDocument");
    EditPoint point = doc.StartPoint.CreateEditPoint();

    // Insert ten lines of text.
    for (int i = 0; i < 10; i++)
        point.Insert("This is a test.\n");

    point.StartOfDocument();

    // Indent text to column 10.
    for (int i = 0; i < 10; i++)
    {
        point.PadToColumn(10);
        point.LineDown(1);
        point.StartOfLine();
    }
}

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint2 واجهة

EditPoint2 الأعضاء

PadToColumn التحميل الزائد

EnvDTE80 مساحة الاسم

موارد أخرى

كيفية: الترجمة وإعادة تشغيل أمثلة التعليمات البرمجية لطراز كائن التنفيذ التلقائي