Skip to main content
Table of Contents

TTMSFNCBadge.Control Property

The control over which the badge is anchored and displayed.

API unit family: TMSFNCBadge Declaring type: TTMSFNCBadge Inherited from: TTMSFNCCustomBadge Type: TControl

Syntax

FMX.TMSFNCBadge.hppPascalC++
property Control: TControl;
__property Fmx::Controls::TControl* Control = {read=FControl, write=SetControl};

Usage examples

Attach a badge to a control

Positions a notification badge over another control.

Attach a badge to a controlPascalC++
procedure TForm1.ConfigureBadge;
begin
  TMSFNCBadge1.Control := TMSFNCButton1;
  TMSFNCBadge1.Text := '3';
  TMSFNCBadge1.AutoSize := True;
  TMSFNCBadge1.HorizontalPosition := bhpRight;
  TMSFNCBadge1.VerticalPosition := bvpTop;
  TMSFNCBadge1.ShowBadge;
end;

void __fastcall TForm1::ConfigureBadge()
{
  TMSFNCBadge1->Control = TMSFNCButton1;
  TMSFNCBadge1->Text = "3";
  TMSFNCBadge1->AutoSize = true;
  TMSFNCBadge1->HorizontalPosition = bhpRight;
  TMSFNCBadge1->VerticalPosition = bvpTop;
  TMSFNCBadge1->ShowBadge();
}

Read the related guide