Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / September 2005

Tip: Looking for answers? Try searching our database.

ErrorProviders - Icon Change at Run-Time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Le Monnier - 23 Sep 2005 15:04 GMT
My user interface design requires that ErrorProviders are used for errors
but also to indicate warnings to the users as well. In order to provide a
clear visual clue between errors and warnings its necessary to have two
differing icons.

I could place two ErrorProviders on my form, but what I would really like to
do is switch the Icon on the ErrorProvider control at run-time. But I am
having difficulty in understanding the syntax required to point the
ErrorProvider icon property at an Icon embedded inside the project assembly.

Does anybody have an suggestions on the syntax required to achieve this?

Many thanks

Steve Le Monnier
Oliver Sturm - 23 Sep 2005 15:34 GMT
>My user interface design requires that ErrorProviders are used for errors
>but also to indicate warnings to the users as well. In order to provide a
[quoted text clipped - 8 lines]
>
>Does anybody have an suggestions on the syntax required to achieve this?

This MS knowledge base article should have all the information you need:
http://support.microsoft.com/Default.aspx?id=319292

However, I have done the same thing in the past and I've found it more
practicable to use two different error providers - not so much switching
code, and the code is easier to understand because it's plain to see what
provider is used in a specific error/warning situation.

               Oliver Sturm
Signature

Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)

Steve Le Monnier - 23 Sep 2005 21:18 GMT
Thanks for the advice Oliver I will do some additional tests before deciding
what to do.

FYI: My post was a simplification of what I am trying to achieve. I'm not
dragging the ErrorProviders onto a form I am actually embedding them
directly inside my own TextBox control, that's the reason why I don't want
to overload the control with four versions of the error provider when I know
only one can ever be active at any one time.

By having ErrorProviders built into a textbox control I can centralise some
of the standard data validation I do on every single project I work on. This
should allow me to reduce the amount of form validation code I end up
writing.

Cheers

Steve Le Monnier

>>My user interface design requires that ErrorProviders are used for errors
>>but also to indicate warnings to the users as well. In order to provide a
[quoted text clipped - 18 lines]
>
>                Oliver Sturm

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.