| Advanced Features > Nested Managers and Nested Graphers > Nested Managers > Example: Adding a Nested Manager |
Example: Adding a Nested Manager |
INDEX
PREVIOUS
NEXT
|
Here is the code for a simple example:
This simple example creates two IlvManager objects, the top-level manager (variable toplevel) that will be displayed in the view and the submanager (variable subManager). The submanager is added in the top level by the line:
toplevel.addObject(subManager, false);
Two rectangles are also added to the submanager. Another rectangle is added at the top level.
The resulting application is shown in Figure 1.2.
The white area is the submanager containing two rectangles.
| Note |
| Adding a manager to a manager can be done to an infinite level. The library will just make sure that you do not create cycles in the hierarchy of nested managers. |
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |