This sort of functionality and the process of undo-redo can be managed using
the Command Pattern.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"thechaosengine" <na> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> Does anyone know of a design pattern to deal with the issue of making UI
> controls active and inactive according to the context of what the user is
> doing?
>
> I've been thinking about the best way to handle this but the only way I
> can really think to do it would likely be very messy - trying to deal with
> it in event handlers. I can imagine that trying to disable and enable
> buttons and menu items and toolbars for a whole host of ui elements for a
> whole host of different application contexts could be very messy.
>
> Are there any particular approaches that i should be looking at to manage
> the problem a bit better?
>
> Thanks everyone
>
> Simon
>