Search code examples
delphidelphi-7delphi-2010

Updating Delphi 7 app to run on Delphi 2010


I am trying to port an open source application that was written in delphi 7 to compile under Delphi 2010 instead so I can fix some international character support issues.

I am running into a bottleneck that the application relies on the Unoffical Action Band Update for Delphi 7. As I understand it, the Action Band Update is used to create XP style pop-up menus (TActionPopupMenu), but the component is version-specific to Delphi 7.

What component(s) should I look into to provide similar functionality under Delphi 2010? Would TPopupMenu in the menus class be equivalent? I am not terribly knowledgeable about Delphi yet to know whether I'm on the right track of how to resolve this dependency.


Solution

  • The article you linked states that it is to provide popup menu support for action bands as that didn't ship with D7. I would assume that something similar is by now a standard feature of the action bands.

    Opening up D2010 and checking the tool palette for components related to action bands, I see:

    • TActionManager
    • TActionMainMenuBar
    • TPopupActionBar
    • TActionToolBar

    TPopupActionBar seems to be the one you want. It's icon is identical to the icon for a normal TPopupMenu.

    To upgrade, it may be easiest to create a new form in D2010 and duplicate a minimum of the stuff you have on your current D7 action bands. Check the dfm for the properties you need to set to do your stuff. With that knowledge you could manually edit your actual dfm and pas to use TPopupActionBar's where you now have Steve's popup menu's. Even though it may be a lot of work, it will probmay be faster than using the IDE to switch over. (I do hope you are using source control so you can go back and try again...)