I've just faced with an interesting problem with TPopUpMenu.

I've just faced with an interesting problem with TPopUpMenu.

I wanted to move one of TPopupMenus in project from main form to DataModule, but found out that I can't place TPopupMenu on TDataModule in Delphi XE2.
When I open TDataModule, IDE Insight doesn't show TPopupMenu, IDE also hides it in Tool Palette. When I try to copy existing menu to DataModule, IDE tells "Class TPopupMenu not found".

I've checked in Delphi 2010, and it works fine.

Any ideas? What is wrong? How do I fix the problem?

Comments

  1. It's a feature, not a problem. ;)

    ReplyDelete
  2. TPopupMenu can be placed on a DataModule in XE4 - just checked.  Strange if you can't in XE2.

    ReplyDelete
  3. 8)
    I found the answer http://stackoverflow.com/questions/14097246/delphi-xe2-data-module-expects-only-database-components
    Seems I should change ClassGroup property of DataModule in ObjectInspector to Vcl.Controls.TControl

    ReplyDelete
  4. Interesting: ClassGroup was blank in my DataModule.

    ReplyDelete

Post a Comment