Problem showing/creating FNCBadge at runtime

I am trying to create and show a FNCBadge at runtime,. but this does not work (no badge displayd).

  var
  TMSFNCBadge: TTMSFNCBadge;
  TMSFNCBadge := TTMSFNCBadge.Create(Self);
  TMSFNCBadge.Name := 'TMSFNCBadge';
  TMSFNCBadge.TabOrder := 31;
  TMSFNCBadge.Visible := True;
  TMSFNCBadge.Text := '!';
  TMSFNCBadge.Control := bnd_DataSource1_Sex;
  TMSFNCBadge.HorizontalPosition := bhpLeft;
  TMSFNCBadge.ShowBadge;

Creating at designtime works ok.

What am I missing?

Tx!
Bernd

Hi,

You need to set the Parent too.

TMSFNCBadge := TTMSFNCBadge.Create(Self);
TMSFNCBadge.Parent := Self;