tblIRule SetBackgroundColor

Sets the background color that should be applied on a cell that passes this rule.

Syntax

tblIRule_handle SetBackgroundColorbgColor

Application

HyperWorks Tcl Query

Description

To set up conditional formatting of table cells,you must first add a rule. Next, you must get the rule handle and set the relevant parameters on the rule handle. These parameters are used to format the cells that are part of the rule.

One type of parameter is the background color of a cell. This API helps in setting the same.

Inputs

bgColor
The background color. An integer between 0 and 63.

Example

set t [hw::GetT]
set activetableHandle [hwi GetActiveClientHandle ch$t]
set ruleid [ch$t AddRule]
set ruleHandle [$activetableHandle GetRuleHandle rh$ruleid $ruleid]
$ruleHandle SetCellList "A1 A2 B1 B2"
$ruleHandle SetBackgroundColor 3
puts "Background Color [$ruleHandle GetBackgroundColor] will be applied on cells that pass rule $ ruleid "
$ruleHandle SetTextColor 0
$ruleHandle SetValue 10
$ruleHandle SetOperator ">"
$ruleHandle ReleaseHandle

Errors

Returns success(0) or an error code.