PC Review


Reply
Thread Tools Rate Thread

A design pattern for managing the activation and deactivation of menus and buttons etc in an application

 
 
thechaosengine
Guest
Posts: n/a
 
      6th Mar 2005
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

 
Reply With Quote
 
 
 
 
Bob Powell [MVP]
Guest
Posts: n/a
 
      6th Mar 2005
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
>



 
Reply With Quote
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
Guest
Posts: n/a
 
      7th Mar 2005
Set up a single handler that is called from the various postback events that
cause situtations that enable/disable controls. The basic design pattern is a
command pattern, but you will not likely go full bore on this, as you will
end up moving away from the UI or creating a rather complex page.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"thechaosengine" wrote:

> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Deactivation/Activation =?Utf-8?B?c2NvcmNoaW9sZWU=?= Windows Vista General Discussion 20 24th Oct 2007 06:58 PM
Upgrading PC Activation / Deactivation =?Utf-8?B?RGVubmlz?= Windows Vista Installation 3 30th Mar 2007 05:21 PM
Command line activation/deactivation Rolfie Windows XP Networking 1 27th Aug 2005 10:56 AM
A design pattern for managing the activation and deactivation of menus and buttons etc in an application thechaosengine Microsoft Dot NET Framework Forms 3 7th Mar 2005 01:45 PM
A design pattern for managing the activation and deactivation of menus and buttons etc in an application thechaosengine Microsoft Dot NET Framework 3 7th Mar 2005 01:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:42 PM.