The ActionManager Component

Hierarchy: TObject - TPersistent - TComponent - TCustomActionList - TCustomActionManager - TActionManager

This component is used, in conjunction with the ActionToolbar and ImageList, to produce toolbars and menus.

Properties

ActionBars

This gives access to the ActionBars editor from which you can select ActionBars you have added and change their properties. From this you access the Background property (change the background image), the BackgroundLayout property, the Color property (change the colour of the toolbar), the GlyphLayout property (left, right, etc.) and the Items property (which items are present on the toolbar).

Images

Use this property to provide a list of images to associate with actions in a toolbar. You will have to add an ImageList first (Win32 palette). When you have added an ImageList you can pick up the standard images that go with standard actions automatically, Delphi adds the image to the list and sets the ImageIndex property. For non-standard actions you will have to add images yourself and choose their ImageIndex manually.

Example

To create a toolbar on a form with standard actions proceed as follows:

Here is a simple example showing how a memo can be used as a simple text editor:

When you run the application you can use the options on the toolbar to carry out standard operations such as copy, cut, paste, select and undo.

Back to Tutorial

Back to Palette List