Height of Controls

This change adjusts the logic used in determining the height of controls. This partially resolves an issue that became apparent in build 973 in which buttons at the bottom of ALTPOS dialogs suddenly got closer to the bottom than before, but, for worse or hopefully better, goes beyond that.

The new rule is that when the EROW coordinate of a control is expressed using regular rows (not millirows), then the control height will not include the external leading (see Misc. Settings dialog), unless it is a variation of edit control and the Misc. Settings option to allow edit controls to extend into the leading area is set. On the other hand, if the EROW coordinate was expressed in millirows, then the control height will include the external leading.

Previously, the second part of the rule was also contingent on the ALTPOS option. (Then, in 973, it was inadvertently changed so that as long as ALTPOS was in effect, millirows were not needed to get full-height controls.)

This sounds confusing, but hopefully the new rule is more logical and simpler than the old one. The idea behind it is as follows:

• When using regular row units, it is common to put controls in adjacent rows. In order for these to not appear too crowded (especially for buttons and other controls that have their own borders), it seemed logical to preserve the external leading area between the rows as empty space.

• But, when using millirows, the idea is that row N occupies millirows N*1000 to (N+1)*1000-1. (E.g., row 5 spans millirow 5000 to 5999.) Thus, if you actually asked for a control to occupy millirows 5000 to 5999, you would expect it to be right up to the edge of another control that started in millirow 6000. It would seem too confusing if the system automatically converted your request for a control spanning millirows 5000-5999 into one spanning millirows 5000-5850 in order to preserve the leading area.

This line of reasoning seems sensible whether or not ALTPOS is in effect. So, if you are updating from a previous version, it is possible that depending on whether you were using millirows and/or ALTPOS, that some of your buttons and edit boxes may get taller or shorter by the amount of the leading, but in the majority of those cases, the effect will probably be too small to matter much, or will be an improvement.

A sample program, TSTBTX in [9??,*] has been added to the EXLIB to illustrate the different button heights for different button styles.