Browse Prior Art Database

Implementation of Visual Highlighting for Required-Entry and In-Error Entry Fields

IP.com Disclosure Number: IPCOM000115066D
Original Publication Date: 1995-Mar-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 119K

Publishing Venue

IBM

Related People

Johnson, DK: AUTHOR [+2]

Abstract

Disclosed is a method that can be used by an application to implement visual highlighting of entry fields in the best manner, a design for an interface between the application and the user that allows the usage and the colors of the highlighting to be user configurable. Also disclosed is a description of exactly how and when highlighting should be done in order to maximize the appearance and user friendliness of a window.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 47% of the total text.

Implementation of Visual Highlighting for Required-Entry and In-Error
Entry Fields

      Disclosed is a method that can be used by an application to
implement visual highlighting of entry fields in the best manner, a
design for an interface between the application and the user that
allows the usage and the colors of the highlighting to be user
configurable.  Also disclosed is a description of exactly how and
when highlighting should be done in order to maximize the appearance
and user friendliness of a window.

      Entry fields in an OS/2* Presentation Manager* (PM) application
can require many different kinds of qualification and validation.  A
common type of requirement for an entry field is that some text must
be entered into it.  This type of entry field is called
"required-entry".  When validation checks discover an entry field
that does not pass qualification tests, that entry field is
considered to be in error.  The Common User Access* (CUA) standards
recommend that required-entry entry fields and entry fields that are
in error due to their having failed any type of qualification test,
should be visually highlighted.

      The CUA standards recommend that required-entry entry fields be
highlighted with an underline and entry fields in error be
highlighted with a line around all but the top of the entry field.
These highlights should be in color.

      Though these standards only address entry fields, this
highlight support should be extended to all entry field-bearing
controls.  This includes the standard single-line entry fields,
multiline entry fields, and the entry fields on simple combo boxes,
dropdown combo boxes, dropdown lists, and spinbuttons.

      The actual drawing of the highlight needs to be performed
whenever the control needs repainting, as keyed on the WM_PAINT
message to the control subclass message procedure.  When a repaint is
required, the control should query its rectangle with the
WinQueryWindowRect call.  The returned window rectangle structure can
then be modified to paint only the desired area of the control.  For
required-entry controls, the rectangle should be reduced to a
one-pel-high rectangle running at the bottom of the control.  The
visual line should then be drawn by calling the WinFillRect call for
the designated color for required entry fields.  For controls in
error, this same procedure can be followed to paint not only the
underline, but also each side of the control in the configured error
color.

      Since multiline entry fields can include scroll bars, and these
scrollbars paint on top of the entry field control, the returned
rectangle of the control needs to be adjusted to paint inside the
scrollbars.  This is needed because the scrollbars sometimes repaint
after the entry field repaints.  If the highlights are painted around
the outer edges of the control, and thus on top of the edge of the
scrollbars themselves, when the scrollbars repaint they coul...