Table of Contents

TTMSFNCBadge Class

Displays a badge overlay with text or an image anchored over another control.

API unit family: TMSFNCBadge Inherits from: TTMSFNCCustomBadge

Syntax

TTMSFNCBadge = class(TTMSFNCCustomBadge)

Properties

Name Description
Appearance Controls the fill, stroke, and font appearance of the badge for each interaction state. (inherited from TTMSFNCCustomBadge)
AutoSize When True, the badge resizes automatically to fit its text or image content. (inherited from TTMSFNCCustomBadge)
Bitmap Bitmap displayed inside the badge when no text is set. (inherited from TTMSFNCCustomBadge)
Control The control over which the badge is anchored and displayed. (inherited from TTMSFNCCustomBadge)
DisabledBitmap Bitmap displayed when the badge is in a disabled state. (inherited from TTMSFNCCustomBadge)
HorizontalPosition Horizontal anchor position of the badge relative to the linked control. (inherited from TTMSFNCCustomBadge)
Text Text displayed inside the badge. (inherited from TTMSFNCCustomBadge)
VerticalPosition Vertical anchor position of the badge relative to the linked control. (inherited from TTMSFNCCustomBadge)
Visible Controls whether the badge is visible. (inherited from TTMSFNCCustomBadge)

Methods

Name Description
BeginUpdate Suspends visual updates. Pair with EndUpdate around bulk property changes to avoid intermediate repaints. (inherited from TTMSFNCCustomBadge)
EndUpdate Resumes visual updates suspended by BeginUpdate and triggers a repaint when the update counter reaches zero. (inherited from TTMSFNCCustomBadge)
HideBadge Hides the badge by setting Visible to False.
ShowBadge Makes the badge visible by setting Visible to True and ensuring it is brought to the front of its parent control.

Events

Name Description
OnAfterDrawBackground Fires after the badge background is drawn. (inherited from TTMSFNCCustomBadge)
OnAfterDrawImage Fires after the badge image is drawn. (inherited from TTMSFNCCustomBadge)
OnAfterDrawText Fires after the badge text is drawn. (inherited from TTMSFNCCustomBadge)
OnBeforeDrawBackGround Fires before the badge background is drawn, allowing custom drawing. (inherited from TTMSFNCCustomBadge)
OnBeforeDrawImage Fires before the badge image is drawn, allowing the image and rectangle to be modified. (inherited from TTMSFNCCustomBadge)
OnBeforeDrawText Fires before the badge text is drawn, allowing the text and rectangle to be modified. (inherited from TTMSFNCCustomBadge)
OnPositionChange Fires before the badge position changes, allowing the position to be overridden. (inherited from TTMSFNCCustomBadge)
OnPositionChanged Fires after the badge position has changed. (inherited from TTMSFNCCustomBadge)
OnSizeChange Fires before the badge size changes, allowing the size to be overridden. (inherited from TTMSFNCCustomBadge)
OnSizeChanged Fires after the badge size has changed. (inherited from TTMSFNCCustomBadge)

Used by