tblITableEditor AddRule

Adds a rule having empty or default properties and returns the corresponding rule ID.

Syntax

tblITableEditor_handle AddRule

Application

HyperWorks Tcl Query

Descriptions

Used to add rules for conditional formatting of table cells. It adds a rule having default or empty properties and returns the corresponding rule ID. This rule ID can then be used to get the rule handle. Use the rule handle to set the appropriate rule parameters.

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
$ruleHandle SetTextColor 0
$ruleHandle SetValue 10
$ruleHandle SetOperator ">"
$ruleHandle ReleaseHandle
$activetableHandle ReleaseHandle

Errors

None.