Accessing ElipseX Objects from the ElipseX Itself

<< Click to Display Table of Contents >>

 

Accessing ElipseX Objects from the ElipseX Itself

When creating an ElipseX, users can declare properties (XProperties) and insert objects, which can be Screen objects (XControl) or server objects (XFolder and XObject). To access XProperties via scripts, access the property's name directly.

Design tab

Design tab

Properties tab

Properties tab

For example, in the previous figure there is an object XControl1 with a Property1 property, and objects Text1 and Rectangle1.

The Property1 property, which is a Boolean-type, can be accessed using the next script.

Sub XControl1_OnStartRunning()
  XControl1.Property1 = True
End Sub

 

Or else using the next script.

Sub XControl1_OnStartRunning()
  Property1 = True
End Sub

 

If an ElipseX contains internal objects, then users can use the Item method to get a reference for these objects, as in the next script.

Sub XControl1_OnStartRunning()
  Item("Text1").Value = "engine"
  Item("Rectangle1").ForegroundColor = RGB(212, 208, 20)
End Sub

Was this page useful?