insertColumn

insertColumn(at: Integer);

The insertColumn method enables a single column to be inserted into the current sheet of a Table control. The column is empty and assumes the default column width. The existing columns are shifted to the right of the column specified in the at parameter and remain untouched.

The method in the following example shows the use of the insertColumn method.

buttonAddColumn_click(btn: Button input) updating;
begin
    if selectedColumn <> null then
        table1.inputType := InputType_TextBox;
        table1.insertColumn(selectedColumn);
        table1.clearAllSelected;
        selectedColumn := null;
        comboBoxColMoveTo.addItem("Move to Column " &
                                  (comboBoxColMoveTo.listCount + 1).String);
        comboBoxColumns.addItem((comboBoxColumns.listCount + 1).String);
        refresh;
    else
        app.msgBox("You must select a column", "No column selected",
                   MsgBox_OK_Only);
        return;
    endif;
end;