![]() | Type | Description | ||
| String | A formal expression that indicates the formula being used in formatting. For instance, "%0+%1>%2", highlights the cells or the items, when the sum between first two columns is greater than the value in the third column |
The Expression property supports the following binary arithmetic operators:
The Expression property supports the following unary boolean operators:
The Expression property supports the following binary boolean operators:
The Expression property supports the following binary boolean operators, all these with the same priority 0 :
Obviously, the priority of the operations inside the expression is determined by ( ) parenthesis and the priority for each operator. The Expression property may be a combination of variables, constants and operators.
The conditional format feature may change the cells and items as follows:
Samples:
The following VB samples bolds all items when the sum between first two columns is greater than 0:
Gantt1.ConditionalFormats.Add("%0+%1>0").Bold = True
The following C++ sample bolds all items when the sum between first two columns is greater than 0:
COleVariant vtEmpty; m_gantt.GetConditionalFormats().Add( "%0+%1>0", vtEmpty ).SetBold( TRUE );
The following VB.NET sample bolds all items when the sum between first two columns is greater than 0:
AxGantt1.ConditionalFormats.Add("%0+%1>0").Bold = True The following C# sample bolds all items when the sum between first two columns is greater than 0:
axGantt1.ConditionalFormats.Add("%0+%1>0", null).Bold = true The following VFP sample bolds all items when the sum between first two columns is greater than 0:
thisform.Gantt1.ConditionalFormats.Add("%0+%1>0").Bold = .t.