The TMenu has an OnChange event which you could use.

I would recommend creating a method of type TMenuChangeEvent within your
component and as soon as the TMenu property is set, assign this method to
the TMenu's onChange event.  Since OnChange is called every time the menu
structure changes, your method will just have to locate what has changed and
work accordingly.

HTH

Antoine

-----Original Message-----
From: Donovan J. Edye [mailto:[EMAIL PROTECTED]]
Sent: 08 September 1999 02:21
To: DUG; Delphi_L
Subject: [DELPHI-LIST] Receiving a change notification....


From: "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?

TIA

--Donovan
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems, Delphi Developer
Web: www.namsys.com.au
E-Mail: [EMAIL PROTECTED]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic := Class(None);



--------------------------- ONElist Sponsor ----------------------------

ONElist:  your connection to online communities.

------------------------------------------------------------------------


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

Reply via email to