Product : Engine, Version : 5.0.1.1034, ArticleID : 41023803

HowTo : Short of layer names in PropertiesList

Article41023803
TypeHowTo
ProductEngine
Version5.0.1.1034
Date Added12/6/2004
Submitted byLevi Azevedo
Keywords

Subject

Short of layer names in PropertiesList

Summary

How do i do to order Layers in Show [first current and other in Order..]

example ....
VectorDrawProperties1.ShowVectorObject oDocument.vdraw.ActiveDocument.Layers

Solution

This can be done by code using the ChangeOrder method. See sample code below. Note: You might need to write a "short-string-array" procedure.


Private Sub Command1_Click()
  '--- Create layers, random order
  VDPro1.ActiveDocument.Layers.Add "3"
  VDPro1.ActiveDocument.Layers.Add "2"
  VDPro1.ActiveDocument.Layers.Add "end"
  VectorDrawProperties1.ShowVectorObject VDPro1.ActiveDocument.Layers
End Sub

Private Sub Command2_Click()
  ' --- Short layers
  VDPro1.ActiveDocument.Layers.ChangeOrder VDPro1.ActiveDocument.Layers.FindName("3"), 0
  VDPro1.ActiveDocument.Layers.ChangeOrder VDPro1.ActiveDocument.Layers.FindName("end"), 0
  VectorDrawProperties1.ShowVectorObject VDPro1.ActiveDocument.Layers
End Sub

Private Sub Form_Load()
  Set VectorDrawProperties1.oControl = VDPro1
End Sub