BOOL32 __stdcall tblSetCellImageA(ITBL Table, int32_t Row, int32_t Col, BOOL32 ForeGround, TCellAlign HAlign, TCellAlign VAlign, float Width, float Height, const char* Image, uint32_t Index);
BOOL32 __stdcall tblSetCellImageEx(ITBL Table, int32_t Row, int32_t Col, BOOL32 ForeGround, TCellAlign HAlign, TCellAlign VAlign, float Width, float Height, void* Buffer, uint32_t BufSize, uint32_t Index);
function tblSetCellImageA(const Table: ITBL; Row, Col: Integer; ForeGround: LongBool; HAlign, VAlign: TCellAlign; Width, Height: Single; const Image: PAnsiChar; Index: Cardinal): LongBool; stdcall;
function tblSetCellImageEx(const Table: ITBL; Row, Col: Integer; ForeGround: LongBool; HAlign, VAlign: TCellAlign; Width, Height: Single; const Buffer: Pointer; BufSize, Index: Cardinal): LongBool; stdcall;
Purpose. Place an image in a cell, sourced from a file path (A/W) or an in-memory encoded buffer (Ex).
Description. All three store into the same real TTableCell fields (HasImage/ImgName/ImgBuf/ImgFG/ImgHA/ImgVA/ImgW/ ImgH/ImgIndex) — the actual file/buffer decode presumably happens later, at tblDrawTable time (not traced further in this chapter). ForeGround selects whether the image paints over cell text/background (True) or beneath it (False). tblSetCellImageW's Image path is silently truncated to Latin-1 per the chapter-wide finding above — a non-ASCII file path passed via the W form will fail to resolve to the real file.
Parameters.
| Parameter | Description |
|---|---|
Table | Target table handle. |
Row, Col | 0-based cell coordinates (correctly Integer here, unlike tblSetCellText). |
ForeGround | True = image paints over text/background; False = beneath. |
HAlign, VAlign | Image alignment within the cell. |
Width, Height | Image display size. |
Image | *(A/W)* File path; W truncated to Latin-1. |
Buffer, BufSize | *(Ex only)* In-memory encoded image bytes. |
Index | Presumably a multi-frame image's frame index (consistent with the SDK-wide Index convention for GIF/TIFF frame selection, V07); not independently confirmed in this chapter. |
Return value. True if Row/Col are in range.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Misc
tblSetCellImageA
tblSetCellImageW
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.