TTMSFNCBadge.ShowBadge Method
Makes the badge visible by setting
VisibletoTrueand ensuring it is brought to the front of its parent control.
API unit family: TMSFNCBadge
Declaring type: TTMSFNCBadge
Syntax
procedure ShowBadge; override;
virtual void __fastcall ShowBadge()/* overload */;
Usage examples
Update badge state
Shows or hides the badge based on a count.
procedure TForm1.UpdateNotificationBadge(ACount: Integer);
begin
if ACount > 0 then
begin
TMSFNCBadge1.Text := ACount.ToString;
TMSFNCBadge1.ShowBadge;
end
else
TMSFNCBadge1.HideBadge;
end;
void __fastcall TForm1::UpdateNotificationBadge(int ACount)
{
if (ACount > 0)
{
TMSFNCBadge1->Text = IntToStr(ACount);
TMSFNCBadge1->ShowBadge();
}
else
TMSFNCBadge1->HideBadge();
}