Menu Speed Button Components

   
Release: 1.1
Date: 15 August 2007
Delphi Compatibility:
D1 D2 D3 D4 D5 D6 D7 D2005 D2006 D2007 D2009 D2010 DXE DXE2 DXE3 DXE4
Red LED Red LED Red LED Green LED Grey LED Green LED Green LED Grey LED Grey LED Grey LED Grey LED Grey LED Grey LED Grey LED Grey LED Grey LED

Overview

Mothballed

Development of the Menu Speed Buttons is frozen.

These components were originally written back in 2001 to get round a well known display problem that Delphi's tool button control had with some display drivers (as on an old Dell machine of mine). I used speed buttons to avoid having to use tool buttons, and needed a button that supported drop down menus, so wrote these components.

Now that those driver problems are long gone the original justification has disappeared. These days I use standard tool buttons and action bars.

Furthermore, the design of the menu speed button components doesn't lend itself to the easy application of XP themes, let alone Vista look and feel. So I'm not going to add this feature.

The final release was issued as v1.1 on 15th August 2007, adding a new feature requested by a user. At the same time I licensed the code under the Mozilla Public License. I'll be leaving the code on the site but will not be updating it.

If you want to take on maintenance please go ahead. The download includes the components' source files and other assets, and all files required to build (and change) the help file. I'd be interested to know about any changes that are made to the components.

This unit contains a set of three speed button components derived from Delphi's TSpeedButton. The buttons either display associated pop-up menus or link together to form connected button / menu button pairs. The speed buttons are designed for use on toolbars, but have other uses. The components are discussed below.

Components

TPJMenuSpeedButton

TPJMenuSpeedButton example

When this speed button is clicked it displays an associated pop-up menu.

A TPopupMenu component is associated with this speed button using the ActiveMenu property. The menu is displayed adjacent to the button. The button can be configured to stay down while the menu is displayed or to return to the up position as soon as it is released.

The example to the right shows a TPJMenuSpeedButton displaying a menu after being clicked. The button has been configured to stay down while the menu is displayed.

TPJLinkedSpeedButton

TPJLinkedSpeedButton example

This speed button can link to and control a slave button that itself controls a pop-up menu.

The button acts like a normal speed button until a TPJLinkedMenuSpeedButton (see below) is linked using the MenuButton property. The TPJLinkedSpeedButton then takes over control of the menu button, with both buttons being depressed together, both being enabled or disabled together and both being moved together.

You can configure the button to automatically trigger any the default menu item of the active menu of the linked speed button.

To understand more about this component please read about TPJLinkedMenuSpeedButton below.

The example opposite shows a linked pair of buttons with the TPJLinkedSpeedButton being clicked and causing the linked menu button to also be depressed.

TPJLinkedMenuSpeedButton

TPJLinkedMenuSpeedButton example

This component functions like a TPJMenuSpeedButton but can be linked to, and controlled by, a TPJLinkedSpeedButton. By default this button is narrow and displays a down arrow glyph. The button "sticks" to the right hand side of the controlling button and moves with it.

This button is designed for those situations where a dual-action button is required: either the main button is clicked to initiate a default action or the attached menu button is clicked to choose from a menu.

The example opposite shows a linked pair of buttons with the TPJLinkedMenuSpeedButton being clicked and displaying its menu. By setting a property you can align the menu under the TPJLinkedSpeedButton instead.

Help file

These components are supplied with an OpenHelp compatible help file that works with the Delphi 4 to 7 IDE. The help file will not integrate with Delphi 2005 and later, but can be used as a stand-alone help file.

Demo project

A demo project is also provided in the download.