RAD Studio |  |

Using Native IDE Objects

Wizards have full access to the main menu, tool bars, action list, and image list of the IDE. (Note that the IDE's many context menus are not accessible through the Tools API.)

The starting point for working with native IDE objects is the INTAServices interface. Use this interface to add an image to the image list, an action to the action list, a menu item to the main menu, and a button to a tool bar. You can tie the action to the menu item and tool button. When the wizard is destroyed, it must clean up the objects it creates, but it must not delete the image it added to the image list. Deleting an image would scramble the indices for all images added after this wizard.

The wizard uses the actual TMainMenu, TActionList, TImageList, and TToolBar objects from the IDE, so you can write code the way you would any other application. It also means you have a lot of scope for crashing the IDE or otherwise disabling important features, such as deleting the File menu. Debugging a wizard discusses steps you can take to debug your wizard if you find it has caused problems like these.

The following topics illustrate how to perform these tasks:

- Adding an image to the image list
- Adding an action to the action list
- Deleting toolbar buttons

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!