Parent component: TSpeedButton (at Embarcadero's DocWiki).
How to create this component.
Source files (zip).
A speed button, suitable for use on a tool bar etc., which can show a bitmap image. There are properties to adjust the images position and whether text is shown or not.
TImageAlign = (iaTop, iaLeft, iaRight, iaBottom, iaCenter);
See ImageAlign property.
ImageType = (itBitmap, itStyleLookup);
See the ImageType property.
property Bitmap: TBitmap read FBitmap write FBitmap;
If ImageType is itBitmap, the bitmap image for the button. Call Bitmap.LoadFromFile to load an image file (in any FireMonkey supported format on your platform). Note that LoadFromFile doesn't raise an exception if the file is invalid. You have been warned.
property ImageAlign: TImageAlign read FImageAlign write SetImageAlign default iaCenter;
The position of the image in relation to the text. Setting iaCenter doesn't look to good if you also have TextVisible=True
property ImageHeight: Single read FImageHeight write SetImageHeight;
property ImageWidth: Single read FImageWidth write SetImageWidth;
The image size. It will be resized to fit neatly within these dimensions if too large or too small (unless you modify the style). FireMonkey is rather good at image resizing, as long as you don't push it.
property ImagePadding: Single read FImagePadding write SetImagePadding;
Padding to put around the image. If the ImageAlign = iaTop or iaBottom this value will be applied both above and below the image. For iaLeft and iaRight, it will be applied either side, and for iaCener it will be ignored.
property ImageStyleLookup: String read FImageStyleLookup write SetImageStyleLookup;
If ImageType is itStyleLookup, this is the style object from which to fetch the bitmap. The object should be of type TImage.
property ImageType: TImageType read FImageType write SetImageType;
Specifies whether the component should fill it's image from an explicitly stated bitmap (the Bitmap property) or from a style resource (the ImageStyleLookup property). If using a style lookup the object should be of type TImage.
property TextVisible: Boolean read FTextVisible write SetTextVisible;
Whether the text is visible, or whether the control only shows the image. If you are only showing the image you'll probably want to set ImageAlign=iaCenter. Note that the default is false.