Sign in Join
FPDoc Onlineexperiment

TButtonGlyph class

In unit Buttons

Represents an image that can be attached to a button.

Declaration

pascal
TButtonGlyph = class(TObject)

Inheritance

  1. TButtonGlyph
  2. TObject

Description

TButtonGlyph is a TObject descendant used to represent the image with the symbol or pictograph displayed on a button, or in a column in a grid. Use the properties and methods in the class to specify the image displayed in the glyph, and the display settings required for the image.

Images and ExternalImages are image lists with the content that can be displayed in the glyph. Glyph contains the bitmap, scaled to the necessary display density, used in the class instance. Width and Height represent the dimensions for the Glyph.

ShowMode determines when the image is displayed, just like its usage in TMenu and TMenuItem.

TransparentMode indicates whether the glyph image is drawn with transparency, as works in conjunction with the Transparent property in the parent control.

TButtonGlyph implements the IImageCacheListener interface used to provide support for cached images in TImageList. TButtonGlyph also implements the IUnknown interface to support the QueryInterface method and reference counting.

TButtonGlyph is the type used to implement the ButtonGlyph property in TCustomBitBtn and TCustomSpeedButton.

See also

Properties

TransparentModeprotectedIndicates the transparency mode used to render the glyph image.
DrawEffectsEnabledpublicIndicates whether drawing effects are enabled for mouse-over and mouse-down events for the button glyph.
GlyphpublicThe bitmap image drawn as the glyph on the button.
GlyphImageLayoutpublic
IsDesigningpublicIndicates whether change notifications are suppressed while editing property values.
NumGlyphspublicThe number of glyphs available for button states.
ImagespublicThe list of available images for the button glyph.
LCLGlyphNamepublicStores the standard LCL resource name used for the Glyph in the class instance.
ExternalImagespublicContains a reference to an external list of images that can be used as the Glyph image,
ExternalImageWidthpublicWidth for the images in the ExternalImages property.
ExternalImageIndexpublicOrdinal position for the bitmap in ExternalImages displayed when the button is Up (not pressed).
ExternalHotImageIndexpublicOrdinal position in ExternalImages for the image displayed when the button is Hot (hovered).
ExternalDisabledImageIndexpublicOrdinal position in ExternalImages for the image displayed when the button is Disabled.
ExternalPressedImageIndexpublicOrdinal position in ExternalImages for the image displayed when the button is Pressed (down).
ExternalSelectedImageIndexpublicOrdinal position in ExternalImages for the image displayed when the button is Selected (has focus).
WidthpublicThe Width of the Glyph image.
HeightpublicThe height of the glyph image.
ShowModepublicIndicates the logic used to display the Glyph image for the class instance.

Methods

QueryInterfacepublicImplements the method from IUnknown.
_AddRefpublicImplements the method from IUnknown.
_ReleasepublicImplements the method from IUnknown.
CacheSetImageListpublicStores the specified Image list in the Images property.
CacheSetImageIndexpublicSets the button state for the image in AIndex to the value specified in AImageIndex.
CanShowprotectedIndicates if the glyph image can be drawn for the button glyph.
CanShowGlyphprotectedDetermines if an image is available for the button glyph.
DoChangeprotectedPerforms actions needed when the glyph image has been changed for the class instance.
GlyphChangedprotectedProvides a default implementation for the OnChange event handler.
SetTransparentModeprotectedSets the value for the TransparentMode property.
CreatepublicCreate - constructor for TButtonGlyph: frees the Images cache then creates a Glyph Bitmap.
DestroypublicDestroy - destructor for TButtonGlyph: frees caches and calls inherited Destroy.
GetImageIndexAndEffectpublicGets the index for a glyph image using a given state, and the effect used to draw it.
DrawpublicDraws the glyph for the button using the specified settings and state.
RefreshpublicUpdates the button glyph after changes to property values.

Events

OnChangepublicEvent handler signalled when the bitmap in Glyph has been changed.

Inherited

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.