EditPoint.PadToColumn(Int32) Метод

Определение

Заполняет текущую строку в буфере пустыми знаками (пробелами) до текущего столбца.

public:
 void PadToColumn(int Column);
public:
 void PadToColumn(int Column);
void PadToColumn(int Column);
[System.Runtime.InteropServices.DispId(131)]
public void PadToColumn (int Column);
[<System.Runtime.InteropServices.DispId(131)>]
abstract member PadToColumn : int -> unit
Public Sub PadToColumn (Column As Integer)

Параметры

Column
Int32

Обязательный. Число заполняемых столбцов, начиная с единицы.

Атрибуты

Примеры

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 10 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 10 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();  
    }  
}  

Комментарии

PadToColumn Вставляет в указанный отображаемый столбец символы табуляции и пробелы в соответствии с глобальными параметрами. Если точка редактирования или активный конец выделения уже находится за пределами указанного столбца, PadToColumn не выполняет никаких действий.

Применяется к