Watch, Follow, &
Connect with Us
Public Report
Report From: Kylix/VCLX/MDI    [ Add a report in this area ]  
Report #:  12366   Status: Open
TPopupMenu usage causes TMainMenu on MDIParent to refresh
Project:  Kylix Build #:  4.186
Version:    3.0 Submitted By:   Robert MacLean
Report Type:  Basic functionality failure Date Reported:  4/28/2005 4:00:34 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   225786
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
If a MDIChild form contains a TPopupMenu, the first time this TPopupMenu is called the MDIParent form "refreshes". This "refresh" causes any manually merged menu's to be lost.
The MDIChild does not have to have a TMainmenu and the TPopupMenu does not need to be assigned to the form directly (i.e. it can be assigned to another component on the TPopupMenu).
Steps to Reproduce:
See attachment
Workarounds
Using the TMainMenu's OnChange redo the merge.
i.e:

procedure aForm.aMainMenu(Sender: TObject; Source: TMenuItem; Rebuild: Boolean);
begin
  aMainMenu.Merge(aSecondForm.anotherMainMenu);
end;

This though can give a huge performance hit to a large merge
Attachment
qc.zip
Comments

None

Server Response from: ETNACODE01