TTMSFNCBadge
TTMSFNCBadge
is a visual control that allows you to display a notification badge with custom text and image on top of other controls. With the help of the HorizontalPosition
and VerticalPosition
properties the TTMSFNCBadge
can be positioned quickly and efficiently on top of the assigned Control
. It's also possible to customize the look of the badge based on its different states.
Properties
Property name | Description |
---|---|
Appearance | Various appearance settings for the badge. |
AutoSize: Boolean | If enabled, the TTMSFNCBadge will set its own size automatically based on the Text property. |
Bitmap: TTMSFNCBitmap | Bitmap to show in the badge. |
DisabledBitmap: TTMSFNCBitmap | Bitmap to show in the badge in disabled state. |
Control: TControl | If a control is assigned, the badge will position itself on top of the assigned control, based on the HorizontalPosition and VerticalPosition properties. |
HorizontalPosition: TTMSFNCBadgeHorizontalPosition | Sets the horizontal position that is used when Control is assigned to the badge. |
Text: string | Sets the text in the badge. |
VerticalPosition: TTMSFNCBadgeVerticalPosition | Sets the vertical position that is used when Control is assigned to the badge. |
Methods
Method name | Description |
---|---|
HideBadge | Method to hide the badge programmatically. |
ShowBadge | Method to show the badge programmatically. |
Events
Event name | Description |
---|---|
OnAfterDrawBackground | Event triggered after the badge background is drawn. |
OnAfterDrawImage | Event triggered after the image in the badge is drawn. |
OnAfterDrawText | Event triggered after the text in the badge is drawn. |
OnBeforeDrawBackGround | Event triggered before the badge background is drawn. |
OnBeforeDrawImage | Event triggered before the image in the badge is drawn. |
OnBeforeDrawText | Event triggered before the text in the badge is drawn. |
OnPositionChange | Event triggered before the badge position changes. To prevent the position change, modify the AAllow parameter.To change the coordinates, use the AX and AY parameters. |
OnPositionChanged | Event triggered after the badge position has changed. |
OnSizeChange | Event triggered before the badge is resized. To prevent the resizing, modify the AAllow parameter.To change the width/height of the badge, use the AWidth and AHeight parameters. |
OnSizeChanged | Event triggered after the badge is resized. |