TdxBadge Class
A badge UI adorner element.
Declaration
TdxBadge = class(
TdxCustomAdorner
)
Remarks
A badge is a simple UI adorner that can display an image and/or a custom text message. Badges are particularly useful for marking or emphasizing certain UI elements in your application. All badges are painted on a separate transparent layer on top of the parent form.
The TdxBadge class provides the following members that allow you to:
Specify the badge’s target UI element (TargetElementClassName and TargetElement);
Set the badge’s position in relation to its target UI element (Alignment and Offset);
Customize the badge background appearance settings, such as a glyph or solid fill color (Background);
Custom paint the badge and/or its background (OnCustomDraw and OnCustomDrawBackground);
Access the UI adorner manager and collection to which the badge belongs (Manager and Adorners);
Respond to clicking the badge (OnClick);
Specify a text message displayed by the badge (Text);
Customize font settings (Font and ParentFont);
Adjust the automatically calculated badge size and text position (TextMargins);
Explicitly specify the badge’s dimensions (Size);
Show or hide the badge (Visible).
The UI adorner manager‘s Badges.Items property references a TdxBadge object.