Partilhar via


DynamicLineHeight Property

Indicates whether the ReportListener should use GDI+ standard linespacing according to font characteristics, or backward-compatible fixed line spacing.

ReportListener.DynamicLineHeight [= lExpr]

Return Value

Logical data type.

  • True, (.T.)
    (Default) Multi-line objects are rendering using default GDI+ behavior. Line spacing is determined dynamically, according to font. If the object has an opaque fill or backcolor, this color shows for the entire block.
  • False, (.F.)
    Backward compatible mode. Multi-line objects are rendered individually, with fixed spacing. If the object has an opaque fill or backcolor, this color shows only under the rendered text.

Remarks

Applies To: ReportListener Object.

Previous to Visual FoxPro 9, the Report Engine used a fixed line height for rendering multi-line text objects. Visual FoxPro's ReportListener class has the ability to render multi-lined objects using GDI+ default line spacing, which is dynamically adjusted for font characteristics.

You can set this property to .F. if you want the Report Engine to render multi-lined objects line-by-line, using the same spacing as it used in previous versions. This line spacing calculation is as follows:

The Engine takes the height of the object from the FRX (in FRUs, 10000ths of an inch) and divides by the number of lines in the current content for the layout object, according to the current font characteristics. It converts the result to 960dpi to get the height of a single line.

There is a performance penalty for setting DynamicLineHeight to .F., because the Report Engine must calculate the words that fit on each line of the multi-line object before adding the fixed vertical spacing, and then continuing to render the next line.

The two methods of handling multi-line objects also differ in how they show opaque fills or background colors. When DynamicLineHeight is .T., the entire multi-line block is handled by GDI+ as a single object. When DynamicLineHeight is .F., each separately-rendered line contains its own background, and each line may have a different width.

See Also

Tasks

How to: Change Opacity of Report Controls

Concepts

Using GDI+ in Reports

Other Resources

Properties (Visual FoxPro)
Language Reference (Visual FoxPro)