·   Wiki Home
 ·   Wiki Help
 ·   Categories
 ·   Title List
 ·   Uncategorized Pages
 ·   Random Page
 ·   Recent Changes
 ·   RSS
 ·   Atom
 ·   What Links Here

Active Members:



Create or Find Page:


View TBitmapSpeedButton

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 = (iaTopiaLeftiaRightiaBottomiaCenter); 

See ImageAlign property.

ImageType = (itBitmapitStyleLookup); 

See the ImageType property.

property BitmapTBitmap 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 ImageAlignTImageAlign 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 ImageHeightSingle read FImageHeight write SetImageHeight

property ImageWidthSingle 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 ImagePaddingSingle 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 ImageStyleLookupString 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 ImageTypeTImageType 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 TextVisibleBoolean 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.

Category:Custom Controls