When adding tools programmatically to a dropdown menu (via the BeforeToolDropdown event), it works fine in the MDI parent, but when attempting to do the same thing in the MDI child, the added tools do not appear. The tools are definitely in the collection of the popup menu, they simply do not show.
I assume that this has something to do with the merging mechanism. I guess all the tools from the child are imported into the parent and somehow when these programmatic changes happen, they are not being replicated/flushed to the parent.
See the attached sample, it is self explanatory.
How can I force the merged parent tab to refresh with my programmatic changes?
OK, I guess I didn't do my research properly before submitting this. After scouring the forums, I found the solution is to call RefreshMerge on the parent toolbar manager:
MyToolbarsManager.MdiParentManager.RefreshMerge.
Although this is terribly slow.
Thanks!
Hi Matthew,
Thank you for your feedback.
I am glad to hear that you have resolved your issue. Please let me know if you have any additional questions.