From Clomosy Docs
procedure clRTMethod(Object: TCLComponent; xMethod: String);
Allows access to the properties of a component.
Object : The name of the component to be processed should be written.
xMethod : The feature of the selected component to be accessed is written.
This function provides access to various properties. For example, when two components are aligned at the same position, the BringToFront property is used to bring one to the front for visibility, while the SendToBack property is used to keep it at the back.
The BringToFront and SendToBack properties are exclusively used with clRTMethod.
The other important function used exclusively on the Windows platform and with clRTMethod is the ShowModal method. This method also serves the purpose of the Run method. When used, the Run method should not be used. An error is encountered as a result. The ShowModal feature restricts access to and hides the forms prior to the one opened with it. This prevents interference when clicking on the Clomosy project list.
In addition, properties like Run and Show can be utilized for executing the form object and displaying it on the screen, respectively.
clRTMethod(Btn1,'BringTofront');
clRTMethod(Btn2,'SendToBack');
clRTMethod(mainForm,'Show');
clRTMethod(mainForm,'Run'); //mainForm.Run;
clRTMethod(mainForm,'ShowModal'); //Exclusive to Windows platforms only
clRTMethod(mainForm,'RunModal'); //Exclusive to Windows platforms only
Example
var
myForm:TclForm;
showBtn:TclButton;
showImg : TclImage;
void onclikImg;
{
clRTMethod(showBtn, 'BringTofront');
}
void onclikBtn;
{
clRTMethod(showBtn, 'SendToBack');
}
{
myForm = TClForm.Create(Self);
showBtn = myForm.AddNewButton(MyForm, 'btn1','click');
showBtn.Width = 200;
showImg = MyForm.AddNewImage(MyForm,'showImg');
MyForm.setImage(showImg,'https://clomosy.com/educa/bg3.png');
showImg.Height = 300;
showImg.Width = 300;
MyForm.AddNewEvent(showImg, tbeOnClick, 'onclikImg');
MyForm.AddNewEvent(showBtn, tbeOnClick, 'onclikBtn');
clRTMethod(MyForm, 'Show'); //myForm.Run;
}