From Clomosy Docs

(Created page with "The ClTagInt property is used to store an integer value for any object. It is typically used to carry additional information or identification details specific to the object. textBtn.ClTagInt TclProImage(Myform.Clsender).ClTagInt '''Example:'''<br> :''Basic Syntax:'' Var MyForm:TclForm; testPanel : TclProPanel; testBtn : TClProButton; i : Integer; procedure BtnOnClick; begin ShowMessage(TClProButton(Myform.Clsender).clTagInt); end; begin MyF...")
 
No edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
TCLComponent.ClTagInt :Integer;
</div>
The ClTagInt property is used to store an integer value for any object. It is typically used to carry additional information or identification details specific to the object.
The ClTagInt property is used to store an integer value for any object. It is typically used to carry additional information or identification details specific to the object.


  textBtn.ClTagInt
<b>Example</b><br>
  TclProImage(Myform.Clsender).ClTagInt
 
<pre>
Var 
MyForm:TclForm;
testPanel : TclProPanel;
  testBtn : TClProButton;
  i : Integer;


'''Example:'''<br>
void BtnOnClick;  
:''Basic Syntax:''
{
Var 
  ShowMessage(TClProButton(Myform.Clsender).clTagInt);  
  MyForm:TclForm;
}
  testPanel : TclProPanel;
  testBtn : TClProButton;
  i : Integer;
procedure BtnOnClick;
  begin
  ShowMessage(TClProButton(Myform.Clsender).clTagInt);  
end;
 
begin
  MyForm:=TclForm.Create(self);
  testPanel:=MyForm.AddNewProPanel(MyForm,'testPanel');
  clComponent.SetupComponent(testPanel,'{"Align" : "Center","Width" :200,
"Height":300,"RoundHeight":10,"RoundWidth":10,"BorderColor":"#3a32a8","BorderWidth":2}');
  for i := 0 to 4 do
  begin
  testBtn := MyForm.AddNewProButton(testPanel,'testBtn'+IntToStr(i+1),<nowiki>''</nowiki>);
clComponent.SetupComponent(testBtn,'{"caption":"testBtn'+IntToStr(i+1)+'","Align" : "Top","MarginTop":5,"MarginLeft":5,"MarginRight":5,
  "Height":50}');
MyForm.SetImage(testBtn,'https://clomosy.com/demos/foodInformationBox.png');
  testBtn.clTagInt := i+1;
  MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');
  end;
  MyForm.Run;
end;


:''TRObject Syntax:''
{
  Var  
MyForm=TclForm.Create(self);
  MyForm:TclForm;
testPanel=MyForm.AddNewProPanel(MyForm,'testPanel');
  testPanel : TclProPanel;
testPanel.Align = AlCenter;
  testBtn : TClProButton;
testPanel.Width = 200;
  i : Integer;
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);
   
   
  void BtnOnClick;
  for (i = 0 to 4)
  {
  {
  ShowMessage(TClProButton(Myform.Clsender).clTagInt);
  testBtn = MyForm.AddNewProButton(testPanel,'testBtn'+IntToStr(i+1),'');
}
  testBtn.Align = AlTop;
  testBtn.caption = 'testBtn'+IntToStr(i+1);
{
  testBtn.Margins.Right = 5;
  MyForm=TclForm.Create(self);
  testBtn.Margins.Left = 5;
  testPanel=MyForm.AddNewProPanel(MyForm,'testPanel');
  testBtn.Margins.Top = 5;
  clComponent.SetupComponent(testPanel,'{"Align" : "Center","Width" :200,
  testBtn.Height = 50;
"Height":300,"RoundHeight":10,"RoundWidth":10,"BorderColor":"#3a32a8","BorderWidth":2}');
  MyForm.SetImage(testBtn,'https://clomosy.com/demos/foodInformationBox.png');  
 
  for (i = 0 to 4)
  testBtn.clTagInt = i+1;
  {
  MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');
  testBtn = MyForm.AddNewProButton(testPanel,'testBtn'+IntToStr(i+1),<nowiki>''</nowiki>);
clComponent.SetupComponent(testBtn,'{"caption":"testBtn'+IntToStr(i+1)+'","Align" : "Top","MarginTop":5,"MarginLeft":5,"MarginRight":5,
  "Height":50}');
MyForm.SetImage(testBtn,'https://clomosy.com/demos/foodInformationBox.png');  
  testBtn.clTagInt = i+1;
  MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');
  }
  MyForm.Run;
  }
  }
MyForm.Run;
}
</pre>
<h2> See Also </h2>
* [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]]
*[[ClTagStr | ClTagStr]]
{{#seo:|title=ClTagInt Using in Clomosy - Clomosy Docs}}
{{#seo:|description=Use ClTagInt in Clomosy to store integer values for object identification or extra data.}}

Latest revision as of 12:00, 17 October 2025

The ClTagInt property is used to store an integer 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).clTagInt); 
}

{
 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.clTagInt = i+1;
   MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');
 }

 MyForm.Run;
}

See Also