int32_t __stdcall tblAddColumn(ITBL Table, BOOL32 Left, float Width);
void __stdcall tblDeleteCol(ITBL Table, uint32_t Col);
function tblAddColumn(const Table: ITBL; Left: LongBool; Width: Single): Integer; stdcall;
procedure tblDeleteCol(const Table: ITBL; Col: Cardinal); stdcall;
Purpose. Insert a new column at the left edge or append one at the right, growing every existing row with a new blank cell; or remove a specific column from every row.
Description. Real column insertion — was formerly "a fixed-column no-op" per an explicit inline comment ("G-17: real column insertion (was a fixed-column no-op)"). Left = True shifts every existing column's width and every row's existing cells one slot right before inserting the new blank column/cell at index 0; Left = False simply appends at the end. tblDeleteCol removes that column's width entry and, for every row, deletes that column's cell slot, decrementing NumCols — a real, complete column removal (not a mask/hide).
Parameters.
| Parameter | Description |
|---|---|
Table | Target table handle. |
Left | *(AddColumn only)* True inserts at the left edge (shifting existing columns right); False appends at the right. |
Width | *(AddColumn only)* The new column's width. |
Col | *(DeleteCol only)* 0-based column index to remove. |
Return value. tblAddColumn: the new total column count. tblDeleteCol: none.
C# (P/Invoke)
public static extern int tblAddColumn(IntPtr Table, [MarshalAs(UnmanagedType.Bool)] bool Left, float Width);
Misc
tblAddColumn
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.