Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.OrderToBack |
Sub OrderToBack()
Member of ShapeRange
The OrderToBack method moves a shape range to the back of the stacking order of the current layer.
The following VBA example creates four rectangles and places them in front of all the other shapes of the current layer.
Sub Test() |
Dim s As Shape, sr As New ShapeRange |
Dim w As Double, h As Double |
Dim c1 As New Color, c2 As New Color |
w = ActivePage.SizeWidth / 2 |
h = ActivePage.SizeHeight / 2 |
c1.RGBAssign 255, 0, 0 |
c2.RGBAssign 255, 255, 255 |
Set s = ActiveLayer.CreateRectangle2(0, 0, w, h) |
s.Fill.ApplyFountainFill c1, c2, , 45 |
sr.Add s |
Set s = ActiveLayer.CreateRectangle2(w, 0, w, h) |
s.Fill.ApplyFountainFill c1, c2, , 135 |
sr.Add s |
Set s = ActiveLayer.CreateRectangle2(0, h, w, h) |
s.Fill.ApplyFountainFill c1, c2, , -45 |
sr.Add s |
Set s = ActiveLayer.CreateRectangle2(w, h, w, h) |
s.Fill.ApplyFountainFill c1, c2, , -135 |
sr.Add s |
sr.OrderToBack |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.