FMX.ImgList.TGlyph

From RAD Studio API Documentation
Jump to: navigation, search

FMX.Controls.TControlFMX.Types.TFmxObjectSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTGlyph

Delphi

TGlyph = class(TControl, IGlyph)

C++

class PASCALIMPLEMENTATION TGlyph : public Fmx::Controls::TControl

Properties

Type Visibility Source Unit Parent
class public
FMX.ImgList.pas
FMX.ImgList.hpp
FMX.ImgList FMX.ImgList

Description

Each TGlyph control has the Images reference to a TCustomImageList image list and displays the image identified by the ImageIndex property. The image is scaled to fully fit into the control area. TGlyph element is included in most styled controls.

TGlyph implements the IGlyph interface. TGlyph declares as published the Images, ImageIndex, AutoHide, and Stretch properties to be able to edit them in the Object Inspector. TGlyph inherits TControl and can be used in styles to construct controls.

AutoHide defines that the TGlyph control itself manages the value of the Visible property.

Stretch defines whether to stretch an image rendered in the TGlyph control. By default, Stretch is True and the image is stretched to fit the whole rectangle of the TGlyph control. We recommend to set Stretch to False if the stretched image looks fuzzy.

The Images and ImageIndex properties appear in many graphical controls (buttons, menus, lists, and others) and actions. Notice that for components providing lists of elements, the Object Inspector shows only the Images property. While for elements of these lists the Object Inspector shows only the ImageIndex property. Notice that the Images property of all elements of the list control has the same value as Images in the list control. That is, all menu items always use the same Images collection, that is set in the Images property of the menu.

The component owner of a TGlyph control is specified as the AOwner parameter in the call to the Create (AOwner) constructor of TGlyph controls. This constructor also creates an instance of the TGlyphImageLink image link and assigns the created TGlyph control as the owner of this image link. Images and ImageIndex properties specify an image to be shown in the AOwner component. The TGlyph control uses the created TGlyphImageLink link object to notify the AOwner component about changes in the image list. When Images or ImageIndex changes, then the created TGlyphImageLink object executes the Change method that calls the Glyph.ImagesChanged implementation of the IGlyph.ImagesChanged method in the AOwner component.

Most of the styled controls (TButton, TTabControl, TMenuItem, and others) contain style element TGlyph with
StyleName = 'glyphstyle'

See Also