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 / .NET Framework / General / February 2005

Tip: Looking for answers? Try searching our database.

validating multiple controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
George Chatzigeorgiou - 28 Feb 2005 13:42 GMT
Hi all.

Since I started with .net I have this feeling, that there is no easy way
  of validating mulitple controls on forms, menus etc. Suppose our
application has an MDI , a toolbar , a menu, and some child forms. If I
want to update all controls (toolbar buttons, menu items etc), I have to
capture all events of all controls that affect the states of the
controls mentioned. Be for I go on and write something of my own,
thought I make sure I'm not missing anything important here.

I used to work with another framework, where things on this matter were
much simpler. You could capture an Application.OnUpdate event, and put
all your validation code in there. You could do everything with two or
three methods, and then just assign the OnUpdate event of every control
to the desired method. So I'm wondering if there is anything like it, in
the .net framework.

Thanks for any help
Nick Malik [Microsoft] - 28 Feb 2005 17:05 GMT
Not sure how that is all that different from .Net

Just create some static methods representing changes in application state
(in OO, I'd say create an application object, and provide properties for the
changes in condition that drive the U/I).  Then, in each event handler, call
your methods (or OO object).

If an event handler is one line long, how is that so bad?

Signature

--- Nick Malik [Microsoft]
   MCSD, CFPS, Certified Scrummaster
   http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
  I do not answer questions on behalf of my employer.  I'm just a
programmer helping programmers.
--

> Hi all.
>
[quoted text clipped - 14 lines]
>
> Thanks for any help

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.