Graphical objects

<< Click to Display Table of Contents >>

Navigation:  Project > Screens >

Graphical objects

Previous pageReturn to chapter overviewNext page

Every graphical object has several group of properties. All properties you can edit in Property sheet or in Object settings window (you can get this window by double clicking on the object). The description of every group of properties you can find below in the chapter - Properties. In this chapter we describe one group for every object - General.

This group is responsible for the appearance of the object, contains scripts and user-defined properties. Every object has the following properties:

 

Property

ST script field*

Description

Name

name

Name of the object. You can use indirect name by using group name. To do this use curve braces {}. For example, if group's name is “group” and you enter in the field {group}name and you’ll get name of the object is “groupname”.  

Dimensions

width

Dimensions of the graphical object. Enter width of the object in the W(width) field and enter height of the object in the H(height) field.

height

Coordinates

posx

Coordinates of the graphical object. Write x coordinates of the object in the X(posx) field and enter y coordinates of the object in the Y(posy) field.

poxy

Angle

angle

Select the rotation angle of the object (0, 90, 180, 270).

Type

 

Select the type of the object - 2D or 3D.

Scripts

 

Click Collection to add scripts for the Object. After clicking Collection button you’ll see the following window:

 

objectscripts

where:

Scripts - list of object type scripts.

Add - add script to the object.

Remove - remove script from the object.

User-Defined**

 

Click Collection to add user-defined properties for the Object. After clicking Collection button you’ll see the following window:

 

udproperty

where:

Property - name of the user-defined property.

Value - value of the user-defined property.

Add - add user-defined property to the object.

Edit - edit user-defined property of the object.

Remove - remove user-defined property from the object.

* This field is used in ST scripts. For example: Objects.Button.width = 100. In this script command width of the object with name Button become 100.

** User-defined properties can be used in indirect properties tag names and in scripts. Below is described how to do it.

 

User-defined properties

We have several same type objects, each object has one tag. We can setup  only one object and then duplicate this object and correct only value of User-defined property in new objects. Look at the example.

Let's create several tags: (one for each object):

 

tagsforexample

 

Let's create an object - Button, set user-defined property "number" and set its value "1" (because we want to bind this object to Tag1):

 

udpropertyforexample

 

Then you have to close Collection window and click "OK" to close Object properties window add save this user-defined property for this object. Now open object properties window again to bind this object to the tag (or you can do it in Property sheet). Open Choose tag window for some of the property that bind to the tag:

 

clip0021

choosetag

 

You can use indirect Tag name by using user-defined property number we created and using curve braces {}. Tag name will be looked Tag{number}. For this object number equal 1. So the tag name will be Tag1. So we have a configured object.

Now we can copy this object (Button in our case) and change user-defined property number to bind these objects to other tags. The easiest way to do it change property number in Property sheet:

 

propertysheetforex

 

This is very helpful if you develop big project with similar objects and tags.

 

Also you can use user-defined property in ST scripts. For example, you have user-defined property "description" with some description of the object and want to display it on the screen with some Text object when, for example, you click on this object. You have to create ST script with execution type - OnClick and add this script to the object  which description you want to display. Script code will look like below:

Objects.Text.text = Objects.this.description;

 

Important! If you change user-defined property in ST script it will not affect on the indirect tag name of the object's property.