Modifying properties conditionally at runtime

“Modifying properties at runtime” described how you can use conditional expressions that are evaluated at runtime to highlight information in a DataWindow object. This section presents a procedure for modifying properties at runtime and some examples.

StepsTo modify properties conditionally at runtime:

  1. Position the pointer on the control, band, or DataWindow object background whose properties you want to modify at runtime.

  2. Select Properties from the pop-up menu, then select the page that contains the property you want to modify at runtime.

  3. Click the button next to the property you want to change.

  4. Scroll the list of functions in the Functions box until you see the IF function, and then select it:

    The sample is titled salary dot font dot weight. It displays an Expression that has been selected from the Functions box. It reads if ( b, t, f ). B represents boolean, true represents true, and f represents false.
  5. Replace the b (boolean) with your condition (for example, salary>40000).

    You can select columns and functions and use the buttons to add the symbols shown on them.

  6. Replace the t (true) with the value to use for the property if the condition is true.

    Values to use for properties are usually numbers. They are different for each property. For more information about property values that can be set on the Expressions page, see “Supplying property values”.

    For complete information about what the valid values are for all properties of controls in the DataWindow object, see the discussion of DataWindow object properties in the DataWindow Reference or online Help.

  7. Replace the f (false) with the value to use for the property if the condition is false.

  8. Click OK.

For examples, see “Example 1: creating a gray bar effect”, “Example 2: rotating controls”, “Example 3: highlighting rows of data”, and “Example 4: changing the size and location of controls”.