Skip to main content
Table of Contents

TTMSFNCBadge.ShowBadge Method

Makes the badge visible by setting Visible to True and ensuring it is brought to the front of its parent control.

API unit family: TMSFNCBadge Declaring type: TTMSFNCBadge

Syntax

FMX.TMSFNCBadge.hppPascalC++
procedure ShowBadge; override;
virtual void __fastcall ShowBadge()/* overload */;

Usage examples

Update badge state

Shows or hides the badge based on a count.

Update badge statePascalC++
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();
}

Read the related guide