Search
FlowChart.TreeLayout Method
See Also
 



Applies a tree layout to the diagram (obsolete).

 Syntax

VB6  Copy Code

Public Sub TreeLayout( _
    ByVal rootObj As Object, _
    ByVal tlt As ETreeLayoutType, _
    ByVal tld As ETreeLayoutDirection, _
    ByVal tla As ETreeLayoutArrows, _
    ByVal minItemSpacing As Long, _
    ByVal minLevelSpacing As Long, _
    ByVal keepRootPosition As Boolean, _
    ByVal reversedArrows As Boolean, _
    ByVal xBorderGap As Long, _
    ByVal yBorderGap As Long _
)

C++  Copy Code

public:
void TreeLayout (
    IDispatch* rootObj,
    ETreeLayoutType tlt,
    ETreeLayoutDirection tld,
    ETreeLayoutArrows tla,
    int minItemSpacing,
    int minLevelSpacing,
    bool keepRootPosition,
    bool reversedArrows,
    int xBorderGap,
    int yBorderGap
)

 Parameters

rootObj
The root object of the tree.
tlt

A member of the ETreeLayoutType enumeration specifying how items are aligned.

tld

A member of the ETreeLayoutDirection enumeration specifying the direction in which items are laid-out.

tla

A member of the ETreeLayoutArrows enumeration specifying the style of arrows to use.

minItemSpacing
The minimal space to be left between two items.
minLevelSpacing
The minimal space to be left between two levels of items.
keepRootPosition
Specifies whether to keep the root object's position.
reversedArrows
Specifies the parent to child link direction.
xBorderGap
The horizontal empty space left as border after the layout.
yBorderGap
The vertical empty space left as border after the layout.

 Remarks

This method arranges in hierarchical manner a tree-like structure of nodes. You can call it on whole trees or sub-trees by specifying the object from which to start as first argument of the method. If you pass null (Nothing in Visual Basic) as first argument, and all diagram objects are in a single tree, the control will automatically find the root and start from it. The second argument specifies if items are arranged spreading away from a central axis, or if one of the sides of the tree is kept aligned to the axis. The tld argument specifies in which direction the tree 'grows'. arrowsStyle defines how connections between node will look after the rearrangement. The minX parameters define the minimal space to be left between adjacent items on a single level, and between adjacent levels.

 Note

If you call this method to arrange an arbitrary graph of objects, some of the links in the graph will be ignored; only links that participate in single-directional hierarchical relationships are considered in the layout process.

 See Also