BOOL32 __stdcall tblSetCellTable(ITBL Table, uint32_t Row, uint32_t Col, TCellAlign HAlign, TCellAlign VAlign, ITBL SubTable);
BOOL32 __stdcall tblSetCellTemplate(ITBL Table, int32_t Row, int32_t Col, BOOL32 ForeGround, TCellAlign HAlign, TCellAlign VAlign, uint32_t TmplHandle, float Width, float Height);
function tblSetCellTable(const Table: ITBL; Row, Col: Cardinal; HAlign, VAlign: TCellAlign; const SubTable: ITBL): LongBool; stdcall;
function tblSetCellTemplate(const Table: ITBL; Row, Col: Integer; ForeGround: LongBool; HAlign, VAlign: TCellAlign; TmplHandle: Cardinal; Width, Height: Single): LongBool; stdcall;
Purpose. Nest another tbl* table, or an already-created page template (Templates, Content Capture, and Soft Masks), inside a single cell.
Description. tblSetCellTable requires both Table and SubTable to resolve to real, currently-live table handles (fails if either doesn't). The nested table reference is stored, not owned — TTableCell.SubTable: TObject; // not owned per its own field comment — meaning the caller remains responsible for the sub-table's lifetime: if tblDeleteTable is called on the sub-table before the parent is drawn, the parent cell is left holding a dangling reference. tblSetCellTemplate stores a template handle reference (not the template's content directly) plus its own display size, alignment, and foreground/background flag, mirroring tblSetCellImage's shape.
Parameters.
| Parameter | Description |
|---|---|
Table | Target (parent) table handle. |
Row, Col | Target cell coordinates. |
HAlign, VAlign | Content alignment within the cell. |
SubTable | *(SetCellTable only)* A separate, already-created table handle — referenced, not owned; must outlive the parent's draw call. |
ForeGround | *(SetCellTemplate only)* Paint order relative to cell text/background. |
TmplHandle | *(SetCellTemplate only)* An existing document template handle. |
Width, Height | *(SetCellTemplate only)* Display size. |
Return value. True if the cell coordinates and (for tblSetCellTable) SubTable all resolve.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Misc
tblSetCellTemplate
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.