Previous Document Next Document

Understanding the CorelDRAW object model : Working with layers : Reordering layers


Reordering layers

You can reorder layers by using the following two methods of the Layer class: MoveAbove and MoveBelow. Both methods move the specified layer above or below the layer that is referenced as a parameter.

The following VBA code moves the layer called “Layer 1” to immediately below the layer “Guides”:

Dim pageLayers As Layers
Set pageLayers = ActivePage.Layers
pageLayers("Layer 1").MoveBelow pageLayers("Guides")

The change is immediately reflected in the Object Manager (although it may be apparent only in the Layer Manager).

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.