This article applies to:
Slide E-Objects are unique in the class of Display E-Objects in that they can "host" several Display sub-objects at once. This means that Display sub-objects can overlap at runtime (if positioned to do so). Slides work on a z-order and the sub-object that is highest is displayed on top.
A vital concept to grasp in E-Prime is how its display and drawing operations work at runtime. For example, we have an ImageDisplay that sources an image with an orange background. The Frame of this E-Object is set to 100% of the Display in both the X and Y directions. Following this, we have a TextDisplay object with the Frame only set to 75% in both directions. Many users automatically assume that the display of the ImageDisplay is "wiped clean" when the TextDisplay appears. However, the orange background is not cleared off for the default background (as seen in the image below):
The reason for this is E-Prime's active displaying operations are solely concerned with the "outermost layer" (i.e., whatever is highest in the z-order) of what is being displayed. Therefore, E-Prime does not go out of its way to:
- draw anything new
- "erase" anything old that is not in this outermost layer
This is due to timing considerations; E-Prime is not going to "waste" time by drawing something to the display which it knows is already superimposed by something else (see: INFO: ClearAfter not recommended ). From the perspective in E-Studio, one might conclude that the sub-objects live "at the same level" as one another on the Slide and that all are actively displayed at runtime; each sub-object has its own place in the z-order designating the display "layering", so to speak.
This introduces an often unforeseen challenge when using a HitTest because the HitTest is only looking at the active display (i.e., what is displayed in this outermost layer). If you attempt to perform a HitTest on a Slide with Display sub-objects that overlap one another, only the sub-objects that are on the forefront of the Slide can successfully be "hit", as they obstruct any sub-objects in the background from being hit. To change the z-order of the selected sub-object, you can use the z-order button and dropdown located in the Slide E-Object's menu bar:
For flexibility reasons, there is no number-based z-order designation/property, so you should know how your ordering is beforehand if utilizing multiple layers and many sub-objects.