TdxCustomFlowChart.CreateObject(Integer,Integer,Integer,Integer,TdxFlowChartObjectAdvancedShape) Method
Creates an advanced chart symbol.
Declaration
function CreateObject(L: Integer; T: Integer; W: Integer; H: Integer; AAdvancedShape: TdxFlowChartObjectAdvancedShape): TdxFcObject; overload;
Parameters
| Name | Type | Description |
|---|---|---|
| L | Integer | The distance between the client area’s left border and the created chart symbol’s bounding rectangle, in pixels. |
| T | Integer | The distance between the client area’s top border and the created chart symbol’s bounding rectangle, in pixels. |
| W | Integer | The width (in pixels) of the created chart symbol. |
| H | Integer | The height (in pixels) of the created chart symbol. |
| AAdvancedShape | TdxFlowChartObjectAdvancedShape | The target advanced shape (available in the control’s repository). |
Returns
| Type | Description |
|---|---|
| TdxFcObject | A chart symbol. |
Remarks
Call the CreateObject function to place an advanced chart symbol at the specified point within the control’s area.
Code Example: Create and Configure an Advanced Shape
The following code example creates and configures an advanced shape:
uses
// Contains the TdxFlowChartObjectAdvancedShape class declaration
dxFlowChartShapes;
// ...
var
AObj: TdxFcObject;
// Declared at the dxFlowChartShapes unit;
AAdvancedShape: TdxFlowChartObjectAdvancedShape
begin
// Assigns the "Off Page Reference" shape from the advanced shape repository
AAdvancedShape := dxFlowChart1.Repository.BasicFlowchartShapes.OffPageReference;
// Adds the advanced shape with predefined dimensions to the specified position
AObj := dxFlowChart1.CreateObject(10, 10, 200, 100, AAdvancedShape);
// Fills the shape's background with the silver color
AObj.BkColor := clSilver;
// Fills the shape's background with the gray color
AObj.ShapeColor := clGray;
// Sets text to display within the shape
AObj.Text := 'Document';
// Centers text horizontally within the shape
AObj.HorzTextPos := fchpCenter;
// Centers text vertically within the shape
AObj.VertTextPos := fcvpCenter;
// Rotates the shape clockwise by 45 degrees
AObj.Angle := 45;
end;
You can call the CreateObject(Integer,Integer,Integer,Integer,TdxFcShapeType) function to create a shape from a predefined set of basic shapes.