Please enable JavaScript to view this site.

ASQL Reference

Navigation: » No topics above this level «

Active Versus Inactive Behavior

Scroll Prev Top Next More

In nearly all cases (text and GUI), INFLD fields assume a different form when active (i.e. being edited) vs. when inactive (i.e. displayed). For example, when active, the data in the field is usually stripped of formatting characters and left justified, while the field itself may be underlined or appear in a different color.

In the GUI mode, these active-versus-inactive differences may extend to the type of control object used to contain the field. By default, an edit control (or in some cases a date picker, checkbox, combo box, etc.) is used while the field is active, and a static text control is used when the field is not active. This makes it visually obvious which field has the focus, and may discourage users from wanting to move the cursor randomly about the form by clicking. But, it is different from the "typical" Windows form, where there is often no visual change to a field between its active and inactive state, other than the presence of the cursor.

type |E and ||C may be used to achieve an effect more like the just-described "typical" Windows form. |E causes the field to appear as an edit control when inactive. This applies even to combo boxes and date pickers. ||C is similar, but applies only to combo boxes and date pickers (and time pickers), causing them to retain their drop-down button as well. Neither applies to checkboxes, which always have the same form regardless of whether active or inactive.

Note that when using either |E or ||C, it is imperative that the field send a mouse-click exitcode string (see hlpidx) and that your program respond to these exit codes, so that when the user clicks on such a field, the program can detect the click and retain control. Otherwise, since these control types have their own user interface (independent of your application), the user will have the impression of being able to change the field, but the program will not realize that the change has been made. In the default case, where the field reverts to a static text control when inactive, this is not a problem, since a static text control does not offer any way for the user to directly interact with it, other than simply clicking. You can still define mouse-click exitcode strings and respond to the click by re-activating the field, but the point is that you do not have to.

To make it more obvious to the user which input field has the focus, you can use the Active Background Color option (on the Misc Settings dialog) to define a special background color for edit boxes that have the focus, as shown below:

ashref_img168

To configure that option under program control, see MX_WINSETTINGS.