Previous Document Next Document

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


Deleting layers

As previously discussed, each layer is a member of the Page.Layers collection for the page on which it appears.

You can delete a layer by calling its Delete method. Deleting a layer removes that layer from the document, taking with it all shapes on that layer on all pages in the document.

The following VBA code deletes the layer called “Layer 1”:

ActivePage.Layers("Layer 1").Delete

If you want, you can use event handlers to respond to events that are triggered by deleting a layer:

 
Document.LayerDelete

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.