Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing WinForms ErrorProvider to display its icon inside control's entry

I have some custom/user controls that in most cases have label and entry, like this:

removed dead ImageShack link

Is there any way I can customize the standard WinForms ErrorProvider to display its icon inside entry (entry - textbox, combo, datetime etc...), like this:

removed dead ImageShack link

where the red circle is of course the error indicator.

Thanks for any help.

like image 673
Jarek Avatar asked Jul 15 '09 20:07

Jarek


1 Answers

I've found a solution:

this.errorProvider.SetIconPadding(this.textBox, -20);

where errorProvider is an ErrorProvider Object and textBox is an Entry object.

like image 115
Jarek Avatar answered Nov 14 '22 22:11

Jarek