BPSoftware.com
Home   Utilities   Purchase   FAQ   Support   Contact        
Shareware Utilities
 APrintDirect
 AIconExtract
 AFile Attribute Manager
Freeware Utilities
 AddrMon
 AFileSync
 ASysIcon
 B&P Table Utilities
 BPACLer
 BPSNMPMon
 BPSNMPUtil
 CharCount
 Delphi® Components
 MacAddr
Miscellaneous
 BPSoftware Blog
 Purchase Shareware
 Support

 Subscribe!

Wednesday, April 12, 2006
ErrorProvider

For some reason one of my favorite .NET Framework Class is the ErrorProvider class. This class allows you to visually indicate to the user that there is an error with one of the form controls. For example, if you have a user input form that allows the user to input information into a TextBox and the user tries to proceed without filling in the TextBox you can set the ErrorProvider to display an error icon, with an error hint, adjacent to the TextBox. The option of setting the BlinkStyle and BlinkRate is also neat.

A real simple example:
procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
begin
if TextBox1.text = '' then
ErrorProvider1.SetError(TextBox1,'Invalid Text Entered.')
else
ErrorProvider1.SetError(TextBox1,'');
end;






It is pretty basic and simple to use, but for some reason I am fascinated by it.

Labels: , ,

posted by Brad Prendergast at 6:43:00 AM
Comments:
Links to this post:

Create a Link

Recent Posts
 Ho Hum
 Where is the registry in .NET?
 Managing my Newsgroups
 Meaningful Information
 Rock Paper Scissors
 HTML Element
 ARP! ARP!
 Rightly So
 Easy Does It
 Syndicate Me

 Subscribe!


Labels



Archives
 October 2005
 November 2005
 December 2005
 January 2006
 February 2006
 March 2006
 April 2006
 May 2006
 June 2006
 July 2006
 August 2006
 September 2006
 December 2006
 January 2007
 February 2007
 March 2007
 September 2007
 October 2007
 November 2007
 July 2008
 November 2008
Powered by Blogger