From Clomosy Docs

Revision as of 11:58, 17 October 2025 by Salih (talk | contribs) (Created page with "<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> TCLComponent.ClTagStr :String; </div> The ClTagString property is used to store an String value for any object. It is typically used to carry additional information or identification details specific to the object. <b>Example</b><br> <pre> Var MyForm:TclForm; testPanel : TclProPanel; testBtn : TClProButton; i : Integer; void BtnOnClick; { ShowMessage(TCl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The ClTagString property is used to store an String value for any object. It is typically used to carry additional information or identification details specific to the object.

Example

Var  
 MyForm:TclForm;
 testPanel : TclProPanel;
 testBtn : TClProButton;
 i : Integer;

void BtnOnClick; 
{
 ShowMessage(TClProButton(Myform.Clsender).clTagStr); 
}

{
 MyForm=TclForm.Create(self);
 testPanel=MyForm.AddNewProPanel(MyForm,'testPanel');
 testPanel.Align = AlCenter;
 testPanel.Width = 200;
 testPanel.Height = 300;
 testPanel.clProSettings.IsRound = True;
 testPanel.clProSettings.RoundHeight = 10;
 testPanel.clProSettings.RoundWidth = 10;
 testPanel.clProSettings.BorderColor = clAlphaColor.clHexToColor('#3a32a8');
 testPanel.clProSettings.BorderWidth = 2;
 testPanel.SetclProSettings(testPanel.clProSettings);
 
 for (i = 0 to 4)
 {
   testBtn = MyForm.AddNewProButton(testPanel,'testBtn'+IntToStr(i+1),'');
   testBtn.Align = AlTop;
   testBtn.caption = 'testBtn'+IntToStr(i+1);
   testBtn.Margins.Right = 5;
   testBtn.Margins.Left = 5;
   testBtn.Margins.Top = 5;
   testBtn.Height = 50;
   MyForm.SetImage(testBtn,'https://clomosy.com/demos/foodInformationBox.png'); 
  
   testBtn.clTagStr = 'Button_' + IntToStr(i+1);
   MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');
 }

 MyForm.Run;
}

See Also