Create a New Error Messaging Control

Navigation:  How To... >

Create a New Error Messaging Control

Previous pageReturn to chapter overview

Often a convenient and useful way of validation feedback is to display an error message in some control e.g. label, list box (which can serve as validation log), status bar etc. This way of error indication is supported by TNGControlErrorProvider which references such a control with its ErrMsgControl property. The error messaging control has to support INGValidatingMsgControl interface.

 

INGValidatedControl interface methods:

 

Name

Parameters

Result type

Description

SetErrorMessage

Val : string; ErrorLevel: Integer

none

If ErrorLevel is non-zero should display (or append) the error message val; otherwise should clear the error message.

GetLastErrorMessage

none

string

Should return the most recent (currently visible) error message.

 

See provided with the package example validation aware controls for examples of implementing validated controls.