Attributes of graphics objects

This chapter describes the attributes that can be used for different graphic objects. The table below contains all graphics attributes whose values can be set or read with CONTROL functions.

Attributes that can be set are identified by "s" in the "set/get" column and those that can be read by "g". Those available for panel references are marked with "R". Thus, the entry "s (R)" indicates that the attribute in question can be set for both graphic elements and panel references.

It is not permitted to simultaneously set two graphics attributes that affect each other. If necessary, you must perform two setValue() commands one after the other.

The "Data type" column lists the data types of the parameters for each attribute in the same order in which they must be passed in setValue() or getValue() functions. The entry string means, for instance, that the attribute in question has only one parameter of type string. The entry int , string states that the attribute has two parameters, the first of which is of the type int whereas the second is of the type string.

Sets the contents of a simple text called PRIMITIVE_TEXT1 to "Example".

main()
{
  setValue("PRIMITIVE_TEXT1", "text", "Example");
}

or

<Shape>.<Attribut>("value")
main()
{
  PRIMITIVE_TEXT1.text("Example");
}
Figure 1. A Simple (Primitive) Text

Query the content of a primitive text "PRIMITIVE_TEXT2".

main()
{
  this.text("TEST"); //Content of the text = "TEST".
  dyn_langString retVal;
  getValue("PRIMITIVE_TEXT2","text",retVal); //Query of the text
  DebugN("The text is:",retVal); //text output
}

The special shape name "this" that is used to specify the graphic object itself, for example, this.text("TEST");(see above).

This method is always to be preferred because of its greater readability. It is, however, limited to reading attributes with one parameter and is thus used in parallel with getValue() and setValue(). Other individual exceptions in usage are indicated explicitly in the examples for attributes.

The following table contains all graphics attributes whose values can be set or read by CONTROL functions. Attributes that can be set are identified by "s" in the "set/get" column and those that can be read by "g". Attributes that are also available for panel references contain an (R). Thus the entry s(R) indicates that the attribute in question can be set for both graphic objects and panel references.

For a shape group the attributes enabled, foreCol, backCol, color and visible are write-only!

Only totally visible shapes can be changed correctly with "scale". When resizing childpanels dynamically you have to remember the correct order (first make the shapes smaller and then the panel).