TdxCustomFlowChart.CreateConnection(TdxFcObject,TdxFcObject,Byte,Byte) Method
Creates a new connection between two specified chart symbols.
Declaration
function CreateConnection(OSrc: TdxFcObject; ODst: TdxFcObject; PSrc: Byte; PDst: Byte): TdxFcConnection;
Parameters
| Name | Type | Description |
|---|---|---|
| OSrc | TdxFcObject | The source chart symbol. |
| ODst | TdxFcObject | The destination chart symbol. |
| PSrc | Byte | The attachment point of the source chart symbol ( |
| PDst | Byte | The attachment point of the destination chart symbol ( |
Returns
| Type | Description |
|---|---|
| TdxFcConnection | The created connection between |
Remarks
Call the CreateConnection function to bind OSrc and ODest chart symbols.

Code Example: Connect two Advanced Shapes
The following code example connects two advanced shapes:
var
AConnection: TdxFcConnection;
AObj1, AObj2: TdxFcObject;
begin
// Provides access to the first shape in the control
AObj1 := dxFlowChart1.Objects[0];
AObj2 := dxFlowChart1.Objects[1];
// Attaches the connection to shapes at the specified points
AConnection := dxFlowChart1.CreateConnection(AObj1,AObj2,0,2);
// Sets one-pixel width for the connection line
AConnection.PenWidth := 1;
// Sets the dashed line for the connection
AConnection.PenStyle := psDash;
// Sets the straight line for the connection
AConnection.Style := fclStraight;
// Sets text to display within the connection
AConnection.Text := 'Connection';
// Fills the connection with the gray color
AConnection.Color := clGray;
// Assigns no shape to the connection's start arrow
AConnection.ArrowSource.ArrowType := fcaNone;
// Assigns the "Filled Arrow" shape to the connection's destination arrow
AConnection.ArrowDest.ArrowType := fcaFilledArrow;
end;
See Also