From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
<b>Example</b><br> | <b>Example</b><br> | ||
<pre> | <pre> | ||
Var | Var | ||
| Line 38: | Line 38: | ||
MyForm.Run; | MyForm.Run; | ||
} | } | ||
</pre> | </pre> | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]] | * [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]] | ||
Revision as of 10:48, 13 November 2024
TCLComponent.ClTagInt :Integer;
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');
clComponent.SetupComponent(testPanel,'{"Align" : "Center","Width" :200,
"Height":300,"RoundHeight":10,"RoundWidth":10,"BorderColor":"#3a32a8","BorderWidth":2}');
for (i = 0 to 4)
{
testBtn = MyForm.AddNewProButton(testPanel,'testBtn'+IntToStr(i+1),'');
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;
}