Tuesday 6 March 2018

Why is there no Delphi error provider?

Recently I've been looking at the best solution for displaying a data entry validation error, for example when a user needs to enter a description that is not a duplicate and they enter a duplicate the user is informed of the error. Many web sites will display an error below the text box highlighting an error, or displaying an error icon next to the text box. In C# (Visual Studio 2017) when developing a forms application there is a 'ErrorProvider' component that is easy to use and displays an icon on the right (exclamation mark by default) with a hint that can contain the error text.

What I am looking for is something similar in Delphi (I am currently using Berlin), and I am surprised there is no 'out of the box' standard component that ships with Delphi that can do this.

I have looked at using a TButtonedEdit control with a right button visible with an exclamation mark as the icon when there is an error, but this does not work well.

I imagine that how software informs a user of a data entry validation error is subjective and some developers will have different ideas, but I am interested in what other developers think and are there any decent 3rd party products that have a single error component.       

4 comments:

  1. For windows applications I use DevExpress, and it provider input validation and error indication with icons.

    ReplyDelete
  2. Shameless plug:
    https://blog.dummzeuch.de/2015/04/15/input-validation-in-dzlib/

    ReplyDelete
  3. Thanks for your comments, in the end I decided to write my own component based on the functionality of the Visual Studio component. I chose to do this because it was a simple component to write so did not take much time, I could then easily extend it if required. I considered the Jedi components, but this would take more time to install and manage another third party component set and was no benefit if it was to use just one of the components.

    ReplyDelete