Show: Delphi C++
Display Preferences

Vcl.Buttons.TSpeedButton.Glyph

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Glyph: TBitmap read GetGlyph write SetGlyph stored HasCustomGlyph;

C++

__property Vcl::Graphics::TBitmap* Glyph = {read=GetGlyph, write=SetGlyph, stored=HasCustomGlyph};

Contents

Properties

Type Visibility Source Unit Parent
property published
Vcl.Buttons.pas
Vcl.Buttons.hpp
Vcl.Buttons TSpeedButton

Description

Specifies the bitmap that appears on the speed button.

Set Glyph to a bitmap object that contains the image that should appear on the face of the button. Bring up the Open dialog box from the Object Inspector to choose a bitmap file (with a .BMP extension), or specify a bitmap file at runtime.

Glyph can provide up to four images within a single bitmap. All images must be the same size and next to each other in a horizontal row. TSpeedButton displays one of these images depending on the state of the button.



Image position Button state Description

First

Up

This image appears when the button is unselected. If no other images exist in the bitmap, this image is used for all states.

Second

Disabled

This image usually appears dimmed to indicate that the button can't be selected.

Third

Clicked

This image appears when the button is clicked. If GroupIndex is 0, the Up image reappears when the user releases the mouse button.

Fourth

Down

This image appears when the button stays down indicating that it remains selected.



If only one image is present, TSpeedButton attempts to represent the other states by altering the image slightly for each state, although the Down state is always the same as the Up state.

If the bitmap contains multiple images, specify the number of images in the bitmap with the NumGlyphs property.

Note: The lower left pixel of the bitmap is reserved for the "transparent" color. Any pixel in the bitmap that matches the lower left pixel will be transparent.

See Also

Code Examples


Personal tools
Translations