Modifying a crosstab's properties at runtime

As with other DataWindow objects, you can modify the properties of a crosstab at runtime using the Modify or SetProperty methods. Some changes require the DataWindowControl to dynamically rebuild the crosstab; others do not. (If the original crosstab was static, it becomes a dynamic crosstab when it is rebuilt.)

Changes that do not force a rebuild

You can change the following properties without forcing the DataWindowControl to rebuild the crosstab:

Table 7-1: Properties you can change on a crosstab DataWindow without forcing a rebuild

Properties

Objects

Alignment

Column, Compute, Text

Background

Column, Compute, Line, Oval, Rectangle, RoundRectangle, Text

Border

Column, Compute, Text

Brush

Line, Oval, Rectangle, RoundRectangle

Color

Column, Compute, Text

Edit styles (dddw, ddlb, checkbox, edit, editmask, radiobutton)

Column

Font

Column, Compute, Text

Format

Column, Compute

Pen

Line, Oval, Rectangle, RoundRectangle

Pointer

Column, Compute, Line, Oval, Rectangle, RoundRectangle, Text

Changes that force a rebuild

If you change any other properties, the DataWindowControl rebuilds the structure of the crosstab when Modify is called. You should combine all needed expressions into one Modify call so that the DataWindowControl has to rebuild the crosstab only once.

Default values for properties

For computations derived from existing columns, the DataWindowControl by default uses the properties from the existing columns. For completely new columns, properties (such as font, color, and so on) default to the first column of the preexisting crosstab. Properties for text in headers default to the properties of the first text control in the preexisting crosstab's first header line.

For details on the DataWindow object properties, see the DataWindow Object Reference in the online help.