Managing component depth in a document

If you want to position a component above or below another object in an application, you must use the DepthManager class. The DepthManager application programming interface (API) allows you to place user interface (UI) components in an appropriate z-order (for example, a combo box drops down in front of other components, insertion points appear in front of everything, dialog windows float over content, and so on).

The DepthManager has two main purposes: to manage the relative depth assignments within any document, and to manage reserved depths on the root Timeline for system-level services such as the cursor and tooltips.

To use the DepthManager, call its methods (see DepthManager class).

The following code places the component instance loader below the button component:

loader.setDepthBelow(button);