tblIRule SetOperator
Sets the comparison operator used to compare the reference value with the actual value in the cell.
Syntax
tblIRule_handle SetOperator compOperator
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 decide the formatting of the cells that are part of the rule.
One such parameter is the comparison operator used to compare the reference value with the actual value in the cell. This API helps in setting the same.
Inputs
- compOperator
- The comparison operator used to compare the reference value with the actual value in the cell. Valid alignment values are "=" , ">" , ">=" ,"<" and "<=".
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 ">"
puts "Rule Id: $ruleid will use operator [$ruleHandle GetValue] to compare the reference value with the actual value in the cell."
$ruleHandle ReleaseHandle
Errors
Returns success(0) or an error code.