Skip to main content
A newer version of this page is available. .

Measure Units

  • 2 minutes to read

Supported Measure Units

XtraRichEdit allows you to specify a single unit of measurement used by nearly all API functions. This unit of measurement can be specified by a RichEditControl’s RichEditControl.Unit property or via the document’s Document.Unit property.

The unit of measurement can be set to one of the following types:

  • Document

    Default property value. A document unit corresponds to 1/300 of an inch. Internal calculations are currently performed using this unit of measurement. Used when the Unit property is set to DocumentUnit.Document.

  • Centimeter

    Specifies a centimeter. Used when the Unit property is set to DocumentUnit.Centimeter.

  • Inch

    Specifies an inch. Used when the Unit property is set to DocumentUnit.Inch.

  • Millimeter

    Specifies a millimeter. Used when the Unit property is set to DocumentUnit.Millimeter.

  • Point

    Specifies a point, the typographic unit of measure, equal to 1/72 of an inch. Used when the Unit property is set to DocumentUnit.Point.

  • Twip

    (From the TWentIeth of a Point) Twips are screen-independent units to ensure that the proportion of screen elements are the same on all display systems. A twip is defined as being 1/1440 of an inch. Twips are used in Rich Text Format. Used when the tUnit property is set to DocumentLayoutUnit.Twip.

API Converters

The Units class provides several static methods intended for conversions between various measurement units. Note that unlike other methods, translation between pixels and length measurement units requires specifying the display resolution (dpi).

See Also