From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 24: | Line 24: | ||
<pre> | <pre> | ||
var | |||
MainForm : TclForm; | |||
iconBtn : TCLProButton; | |||
void iconBtnClick; | |||
{ | |||
clRTSetProperty(iconBtn,'Text','Hello World!'); | |||
} | |||
{ | |||
MainForm =TclForm.Create(self); | |||
MainForm.SetFormBGImage('https://clomosy.com/demos/bg1.png'); | |||
iconBtn = MainForm.AddNewProButton(MainForm,'iconBtn','Hello!'); | |||
iconBtn.Align = AlTop; | |||
iconBtn.Height = 150; | |||
iconBtn.Margins.Top = 40; | |||
iconBtn.Margins.Left = 5; | |||
MainForm.AddNewEvent(iconBtn,tbeOnClick,'iconBtnClick'); | |||
MainForm.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 15:26, 20 November 2024
procedure clRTSetProperty(Object: TCLComponent; PropName: String; PropValue: Variant);
Object : The name of the component to be processed should be written.
PropName : The name of the component feature you want to get is specified.
PropValue : The new property value is assigned to PropName.
clRTSetProperty is a part of the Clomosy library and is used to set a property of a component. This function allows you to assign a value to a specific property of a component at runtime.
The general usage is as follows:
clRTSetProperty(MyForm, 'BorderStyle', 0);
clRTSetProperty(MyForm, 'Caption', 'New Caption');
clRTSetProperty(Btn, 'Visible', True);
clRTSetProperty(Btn, 'Text', 'New Text');
Example
var
MainForm : TclForm;
iconBtn : TCLProButton;
void iconBtnClick;
{
clRTSetProperty(iconBtn,'Text','Hello World!');
}
{
MainForm =TclForm.Create(self);
MainForm.SetFormBGImage('https://clomosy.com/demos/bg1.png');
iconBtn = MainForm.AddNewProButton(MainForm,'iconBtn','Hello!');
iconBtn.Align = AlTop;
iconBtn.Height = 150;
iconBtn.Margins.Top = 40;
iconBtn.Margins.Left = 5;
MainForm.AddNewEvent(iconBtn,tbeOnClick,'iconBtnClick');
MainForm.Run;
}