Advanced Features > Nested Managers and Nested Graphers > Hierarchy Events > Graphic Bag Hierarchy Events

When a submanager is added to or removed from its manager, a Graphic Bag Hierarchy event is fired. It notifies recursively all objects contained in the submanager that the root of the submanager nesting hierarchy has changed. The objects that can receive this event are IlvManager, IlvGraphicSet, IlvGraphicHandleBag and their subclasses.

In order to add a listener for Graphic Bag Hierarchy events, you can call on a submanager (or on IlvGraphicSet or IlvGraphicHandleBag):

The GraphicBagHierarchyEvent contains the following information:

Note
The event is fired at the manager, graphic set or graphic handle bag whose graphic bag has changed. It is propagated recursively to all children that implement the GraphicBagHierarchyEventReceiver interface. It is not propagated to children whose ancestors don't implement the GraphicBagHierarchyEventReceiver interface, because the recursive propagation of the event stops on the object that does not implement that interface. For example, if a manager contains an object of type IlvGraphicHandle, which contains an IlvGraphicSet, then the event is not received by the IlvGraphicSet because the IlvGraphicHandle does not implement the interface. However, if the manager contains an object of type IlvFullZoomingGraphic, which contains an IlvGraphicSet, then the event is received by the IlvGraphicSet because both IlvFullZoomingGraphic and IlvGraphicSet implement the interface.