SetTableCellBackgroundColor

颜色、页面布局

描述

使用 RGB 色彩空间设置一个或多个单元格的背景颜色

语法

Delphi

Function TPDFlib.SetTableCellBackgroundColor(TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer; Red, Green, Blue: Double): Integer;

ActiveX

Function PDFlib::SetTableCellBackgroundColor(TableID As Long, FirstRow As Long, FirstColumn As Long, LastRow As Long, LastColumn As Long, Red As Double, Green As Double, Blue As Double) As Long

DLL

int DLSetTableCellBackgroundColor(int InstanceID, int TableID, int FirstRow, int FirstColumn, int LastRow, int LastColumn, double Red, double Green, double Blue);

参数

TableID由 CreateTable 函数返回的 TableID
FirstRow要设置的第一行行号,最上方一行为第 1 行
FirstColumn要设置的第一列列号,最左侧列的列号为 1
LastRow要设置的最后一行行号
LastColumn要设置的最后一列编号
Red颜色的红色分量,值为 0 至 1
Green颜色的绿色分量,值为 0 到 1
Blue颜色的蓝色分量,值范围为 0 到 1

返回值

1背景颜色已应用到所选单元格
0TableID 不是有效表格,或行或列范围超出表格