COMPATIBILITY

Indicates the Natural version (if any) to which the dialog should behave compatibly.

This attribute is currently relevant for dialogs containing edit area, input field or list box controls with 3-D borders. In Natural versions up to and including Version 2.2.3, the effective sizes of such controls was larger than the defined value (1 pixel on all sides). In later Natural versions, prior to Version 6.1.1, the effective sizes of such controls was smaller than the defined value (1 pixel on all sides). As from Natural Version 6.1.1, the controls appear in exactly the defined size, at exactly the defined position.

The use of the COMPATIBILITY attribute is intended to isolate applications from the effects of these changes. If a dialog last saved with a Natural version older than Version 6.1.1 is loaded into the dialog editor in Version 6.1.1 (or higher), and the dialog contains controls affected by the above border change, the dialog editor automatically sets the dialog's COMPATIBILITY attribute to the dialog's previous VERSION attribute. When the dialog is run, and the COMPATIBILITY attribute is set, Natural treats the coordinates passed by the program for the above controls as logical coordinates. The physical coordinates with which the control is created are based on the logical coordinates, but with an adjustment to ensure that the control appears with the same effective size and position as in the older Natural version. Similarly, when the control's coordinates are read, the logical coordinates are returned instead of the physical coordinates.

The relationship between logical and physical coordinates for the above control types are as follows:

Compatibility Relationship
None Logical and physical coordinates are identical.
5.1.1

Logical x-position (RECTANGLE-X) = Physical x-position - 1

Logical y-position (RECTANGLE-Y) = Physical y-position - 1 Logical width (RECTANGLE-W ) = Physical width + 2

Logical height (RECTANGLE-H) = Physical height + 2

2.2.3

Logical x-position (RECTANGLE-X) = Physical x-position + 1

Logical y-position (RECTANGLE-Y) = Physical y-position + 1

Logical width (RECTANGLE-W) = Physical width - 2

Logical height (RECTANGLE-H) = Physical height - 2

It is important to realize that the above distinction between logical and physical coordinates only applies to controls for which a border upgrade is performed (edit areas, input fields and list boxes, for which the "3-D border (3)" STYLE is set). In all other cases, the logical and physical coordinates are identical, regardless of the above compatibility setting.

Note that "2.2.3" in the above table implies Version 2.2.3 or earlier, and "5.1.1" implies versions greater than 2.2.3 up to 5.1.1 (inclusive). Thus, if the COMPATIBILITY attribute is set to "3.1.1", the dialog behaves compatibly with Version 5.1.1. Any patch level number in the COMPATIBILITY attribute string is ignored.

Applies to Dialogs (all types).
Data Type A253
Default Value Empty string
Possible Values Empty string / Compatible Natural version information in encoded string format MMNNSSPP, where MM = major version, NN = minor version, SS = SM level and PP = patch level.