Board index » delphi » Activating/Deactivating MenuItems and Buttons

Activating/Deactivating MenuItems and Buttons

I am using Delphi 5 on Windows 95.

My first Delphi project used a Timer to activate and deactivate menu
items and speed buttons.  The interval was set for once per second so
things would get updated in a (pardon the pun) timely manner.

My current project is using an Action List.  My menu items and speed
buttons all have the Action property set to one of the actions in the
list.  I don't want to use a timer unless ABSOLUTELY necessary so does
anyone have a better idea about keeping the menu items and speed buttons
in synch?

thanks,

--Doug

 

Re:Activating/Deactivating MenuItems and Buttons


Quote
In article <3B2B94AC.DE928...@mpinet.net>, Douglas J. Horton wrote:
> My first Delphi project used a Timer to activate and deactivate menu
> items and speed buttons.  The interval was set for once per second so
> things would get updated in a (pardon the pun) timely manner.

> My current project is using an Action List.  My menu items and speed
> buttons all have the Action property set to one of the actions in the
> list.  I don't want to use a timer unless ABSOLUTELY necessary so does
> anyone have a better idea about keeping the menu items and speed buttons
> in synch?

The whole purpose of actions is to enable you to do this kind of stuff on
a central location for all UI components connected to an action. So if you
connect the same action to a menu item and a speedbutton or toolbutton you
use the actions Onupdate event to enable/disable the *action*, which then
takes care of doing the same for the attached UI components.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

Other Threads