Selecting Menu and Toolbar Styles
Go Up to Handling VCL Actions Using an Action Manager
Just as you can add different colors and icons to individual menus and toolbars, you can select different menu and toolbar styles to give your application a comprehensive look and feel. In addition to the standard style, your application can take on the look of Windows XP, Encarta™, or a custom presentation using a coordinated color scheme. To give your application a coherent look and feel, the IDE uses color maps.
A color map can be simple, merely adding the appropriate colors to existing menus and toolbars. Or, a color map can be complex, altering numerous subtle details of a menu's or toolbar's look and feel, including the smallest button edges or menu shadows. The XP color map, for example, has numerous subtle refinements for menu and toolbar classes. The IDE handles the details for you, automatically using the appropriate color maps.
By default, the component library uses the XP style. To centrally select an alternate style for all your application's menus and toolbars, use the Style property on the ActionManager component.
To select menu and toolbar styles
- From the Additional category of the Tool palette, drop an ActionManager component onto a form.
- In the Object Inspector, select the Style property. You can choose from a number of different styles.
- Once you've selected a style, your application's menus and toolbars will take on the look of the new color map.
You can customize the look and feel of a style using color map components.
To customize the look and feel of a colormap
- From the Additional category of the Tool palette, drop the appropriate color map component onto a form (for example, XPColorMap or StandardColorMap). In the Object Inspector, you will see numerous properties to adjust appearance, many with drop downs from which you can select alternate values.
- Change each ToolBar or menu's ColorMap property to point to the color map object that you dropped on the form.
- In the Object Inspector, adjust the color map's properties to change the appearance of your toolbars and menus as desired.
Note: Be careful when customizing a color map. When you select a new, alternate color map, your old settings will be lost. You may want to save a copy of your application if you want to experiment with alternate settings and possibly return to a previous customization.