Quoting "Donovan J. Edye" <[EMAIL PROTECTED]>:

> G'Day All,
> 
> I have a component that takes a TMenu as a property and then assigns the
> menu items to a control that has 12 buttons on it that maps to the function
> keys. I would like to know how I can get this component to respond should a
> menu item be deleted, its caption changed etc. At the moment the only way
> to
> do this is to unassign the property that points to the TMenu and then
> reassign it. I would like to find a better way. Can anyone steer me in the
> right direction?

You might be in the position of having to derive your own TMenu subclass and 
then override certain of its methods, calling the inherited method and adding 
in a call to a new event handler that you can then use to carry out what you 
wish. Because your new component is a TMenu subclass it should continue to be 
compatible with existing TMenu code.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to