Search
FlowChart.CreateBox Method
See Also
 



Creates a new Box node.

 Syntax

VB6  Copy Code

Public Function CreateBox( _
    ByVal x As Long, _
    ByVal y As Long, _
    ByVal width As Long, _
    ByVal height As Long _
) As Box

C++  Copy Code

public:
Box* CreateBox (
    int x,
    int y,
    int width,
    int height
)

 Parameters

x
The x coordinate of the new box.
y
The y coordinate of the new box.
width
The width of the box.
height
The height of the box.

 Return Value

A reference to a Box object representing the newly created box.

 Remarks

Creates a new box at the the specified location. Properties of any new box are initialized to the values of FlowChart's corresponding box-defaults properties, such as BoxFillColor, BoxFrameColor and so on. For a complete list with all default properties, check Default Values of Object Properties.

Arrows having their AutoRoute property enabled are re-routed if they intersect with the new box. Thus when constructing a large diagram programmatically, each arrow might be re-routed many times, once for each call to CreateBox whose location arguments collide with arrow's bounding rectangle. That might slow down diagram creation a lot. To avoid it, first create all boxes, and afterwards the arrows; that requires a single calculation for each arrow's route.

 See Also