Copyright: Copyright © 1999-2007 Developer Express Inc.
Citation: Copyright © 1999-2007 Developer Express Inc. ALL RIGHTS RESERVED  This program is protected by US and International Copyright Laws.  Any unauthorized reproduction, distribution, and duplication is strictly prohibited.


Overview

The ExpressFlowChart Suite allows for easy creation of applications that display charts, schemes, hierarchies, graphs, etc.  It can help you present extremely complex schemes to end users.

All objects within the flow chart are called items.  The base class for items is TdxFcItem.  It provides the functionality for all other objects within the flow chart.

A block within a flow chart control is called an object.  Objects may be of different shapes and may be drawn with different colors.  Every object can contain text as well as an image.  Object provides different layouts of text and image within the object area.

Flow chart objects are linked via connections.  Connection either links two objects or "hangs"; that is, it is linked only to one object or has no linked objects.  It may be drawn in different ways; for instance, two points may be linked via a straight or curved line, or via horizontal and vertical line.  Like objects, connections may include associated text that appears as a caption next to the line.

An object can be united (grouped) into a union.  If the main Object of the union moves, all other objects move accordingly.  Though you can move several objects if you select them all, union makes the same movement easier for end users.  For instance, assume you construct a plan of several hotel rooms.  If you unite a room and all its contents, you need not select several objects in order to move them to another location within your scheme; All you must do is move the main object of the union.

ExpressFlowChart also provides a number of functions to work with individual lines, i.e. calculating and mass center of a polyline, calculating distance between two points, connection points by lines of different types, etc.

Double click a flow chart control to call the flow chart designer at design time.  With it you can create new objects and connections and customize their look.  Use the right mouse button to call the popup menu for customizing flow chart items.


dxflchrt Unit Overview
dxflchrt Unit

Classes

TdxCustomFlowChart

TdxFcConnection

TdxFcConnectionArrow

TdxFcItem

TdxFcObject

TdxFlowChart


TdxCustomFlowChart

Hierarchy          Properties           Methods           Events         See Also

TdxCustomFlowChart is an abstract class designed to work with irregular data structures.

Unit

dxflchrt

TdxCustomFlowChart = class(TCustomControl);

Description

Use TdxCustomFlowChart as a base class for the creation of new classes to introduce data structures of different types.  It contains many protected properties and methods that are published in its direct TdxFlowChart descendant.


Hierarchy

TCustomControl

     |


Properties for TdxCustomFlowChart
TdxCustomFlowChart Properties

TdxCustomFlowChart          Legend

TdxCustomFlowChart

BorderStyle

ConnectionCount

Connections

Images

LeftEdge

ObjectCount

Objects

Options

RealZoom

SelectedConnection

SelectedConnectionCount

SelectedConnections

SelectedObject

SelectedObjectCount

SelectedObjects

TopEdge

Zoom


Methods for TdxCustomFlowChart
TdxCustomFlowChart Methods

TdxCustomFlowChart         Legend

TdxCustomFlowChart

BeginUpdate

CanSelect

Changed

ChartPoint

Clear

ClearSelection

Create

CreateConnection

CreateObject

DefaultDrawObject

Delete

DeleteConnection

DeleteObject

DeleteSelection

Destroy

EndUpdate

GetConnectionAt

GetHitTestAt

GetObjectAt

InternalCreateConnection

InternalCreateObject

KeyDown

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SelCount

Select

SelectAll

SetLeftTop


Events for TdxCustomFlowChart
TdxCustomFlowChart Events

TdxCustomFlowChart          Legend

TdxCustomFlowChart

OnChange

OnCreateItem

OnDeletion

OnDrawObject

OnSelected

OnSelection


TdxCustomFlowChart.BorderStyle

TdxCustomFlowChart         See Also

Determines whether a flow chart control includes a border.

type

  TBorderStyle = (bsNone, bsSingle)

property BorderStyle : TBorderStyle;

Description

BorderStyle specifies whether a flow chart control includes a single-line border.     Possible values include:

Value	Meaning
bsNone	No visible border
bsSingle	Single-line border

If BorderStyle is equal to bsSingle and Ctl3D isTrue, the border is 3Dimensional.


TdxCustomFlowChart.ConnectionCount

TdxCustomFlowChart         See Also

Returns the total number of connections within a flow chart.

property ConnectionCount : Integer;

Description

Use ConnectionCount to determine the total number of connections within the flow chart structure.  This value changes when creating and deleting connections.  It is usually used with the Connections property to iterate through all presented connections.

ReadOnly Property


TdxCustomFlowChart.Connections

TdxCustomFlowChart         See Also          Example

Represents an indexed array of all connections within a flow chart.

property Connections[Index:Integer] : TdxFcConnection;

Description

Use Connections to access any connection in the flow chart structure.  Use the ConnectionCount property to determine the value of a valid Index.

ReadOnly Property


TdxCustomFlowChart.Images

TdxCustomFlowChart         See Also

Determines which image list is associated with a flow chart control.

property Images : TImageList;

Description

Use Images to provide a customized list of bitmaps that can be displayed within any flow chart object.  The image that is displayed on an individual object is determined by the ImageIndex property of the object.


TdxCustomFlowChart.LeftEdge

TdxCustomFlowChart         See Also

Determines the left position of a flow chart’s window in coordinates of the flow chart control.

property LeftEdge : Integer;

Description

Use LeftEdge to horizontally scroll a window and to determine the distance a flow chart control is scrolled to the left.  You can set any integer value, but the value must be within the current scroll range.  When creating a flow chart control, scroll range is 0.  After creating and moving items, the left margin may produce a negative value.  This value also changes when using the Zoom property.  It is best to calculate a new LeftEdge value relative to its current value.  To scroll the window towards an absolute left or right margin, use the TO_HOME and TO_END constants.

// Delphi

case Key of

  VK_LEFT: LeftEdge := LeftEdge – ClientWidth;  // Scroll one screen left

  VK_RIGHT: LeftEdge := LeftEdge + ClientWidth;  // Scroll one screen right

  VK_HOME: LeftEdge := TO_HOME;  // Scroll to left margin

  VK_END: LeftEdge := TO_END;  // Scroll to right margin

end;

// C++ Builder

switch(Key){

 case VK_LEFT: dxFlowChart1->LeftEdge = dxFlowChart1->LeftEdge – ClientWidth; break; // Scroll one screen left

 case VK_RIGHT: dxFlowChart1->LeftEdge = dxFlowChart1->LeftEdge + ClientWidth; break; // Scroll one screen right

 case VK_HOME: dxFlowChart1->LeftEdge = TO_HOME; break; // Scroll to left margin

 case VK_END: dxFlowChart1->LeftEdge = TO_END; break; // Scroll to right margin

};


TdxCustomFlowChart.ObjectCount

TdxCustomFlowChart         See Also

Represents the total number of objects in a flow chart.

property ObjectCount : Integer;

Description

Use ObjectCount to determine the number of objects in a flow chart structure.  ObjectCount changes when creating and deleting objects.  It is usually used with the Objects property to iterate through all presented objects.

ReadOnly Property


TdxCustomFlowChart.Objects

TdxCustomFlowChart         See Also

Represents an array of all objects in a flow chart.

property Objects[Index:Integer] : TdxFcObject;

Description

Use Objects to access any object within a flow chart structure.  The first element in the array has index 0.  Use the ObjectsCount property to determine the total number of objects within the flow chart.

ReadOnly Property


TdxCustomFlowChart.Options

TdxCustomFlowChart         See Also

Specifies different working modes for a flow chart control.

type

  TdxFcOptions = set of ( fcoCanDelete, fcoCanDrag, fcoCanSelect, fcoMultiSelect, fcoHideSelection, fcoDelOnClick);

property Options : TdxFcOptions;

Description

Use Options to specify flow chart characteristics available to users.  Possible values include:

Value	Meaning
fcoCanDelete	Selected item(s) can be deleted using the Del key.
fcoCanDrag	Users can move and resize objects, or change connections via the mouse or keyboard.
fcoCanSelect	Determines whether objects in the flow chart can be selected.  If fcoCanselect is turned off, selection of a separate item can be enabled via the OnSelection event handler.
fcoMultiSelect	Enables selection of several objects.  To select several objects within the flow chart, click them while holding the Shift key.
fcoHideSelection	Selection is not displayed if the flow chart control does not have input focus.
fcoDelOnClick	A mouse click on a point of a selected connection deletes it from the chart.

By default, all options are active.


TdxCustomFlowChart.RealZoom

TdxCustomFlowChart         See Also

Returns a real scaling factor for a flow chart control.

property RealZoom : Word;

Description

When the Zoom property does not equal 0, RealZoom is the same as the Zoom value.  When it is 0, RealZoom contains a real calculated scaling factor.  Use this property to determine the scaling factor in fit mode.

ReadOnly Property


TdxCustomFlowChart.SelectedConnection

TdxCustomFlowChart         See Also          Example

SelectedConnection points to the current single-selected connection.

property SelectedConnection : TdxFcConnection;

Description

If the flow chart has a single-selected connection, SelectedConnection points to it.  Else, it returns nil.  Setting a new value for this property selects a specified connection and cancels the previous selection.  Setting SelectedConnection to nil will cancel any previously selected connection.


TdxCustomFlowChart.SelectedConnectionCount

TdxCustomFlowChart         See Also

Determines the total number of selected connections within a flow chart control.

property SelectedConnectionCount : Integer;

Description

Use SelectedConnectionCount to determine the number of selected connections in a flow chart structure.  Usually used with the SelectedConnections property to iterate through selected connections.

ReadOnly Property


TdxCustomFlowChart.SelectedConnections

TdxCustomFlowChart         See Also         Example

Defines an array of selected connections in a flow chart control.

property SelectedConnections[Index:Integer] : TdxFcConnection;

Description

Use SelectedConnections to access any selected connection in a flow chart structure.  The index of the first connection in the array is 0.  Use the SelectedConnectionsCount property to determine the total number of selected connections.

ReadOnly Property


TdxCustomFlowChart.SelectedObject

TdxCustomFlowChart         See Also

SelectedObject points to the currently selected object.

property SelectedObject : TdxFcObject;

Description

If a flow chart has a single-selected object, SelectedObject points to it; Else, it returns nil.  Specifying a new value to this property selects a specified object and cancels all previous selections.  Setting a nil value cancels selection of a single-selected object or performs no action in all other cases.  The following example changes the shape width of a selected object:

// Delphi

procedure TForm1.SpeedButton2Click(Sender: TObject);

begin

  if dxFlowChart1.SelectedObject <> nil then

  begin

    dxFlowChart1.SelectedObject.ShapeWidth := 10;

    dxFlowChart1.SelectedObject.ShapeType := fcsDiamond;

    dxFlowChart1.SelectedObject.ShapeColor := clAqua;

  end;

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

 if(dxFlowChart1->SelectedObject != NULL)

  {

    dxFlowChart1->SelectedObject->ShapeWidth = 10;

    dxFlowChart1->SelectedObject->ShapeType = fcsDiamond;

    dxFlowChart1->SelectedObject->ShapeColor = clAqua;

  };

};


TdxCustomFlowChart.SelectedObjectCount

TdxCustomFlowChart         See Also          Example

Represents the number of selected objects within the flow chart.

property SelectedObjectCount : Integer;

Description

Use SelectedObjectCount to determine the number of selected objects in a flow chart structure.  Usually used with the SelectedObjects property to iterate all selected objects.

ReadOnly Property


TdxCustomFlowChart.SelectedObjects

TdxCustomFlowChart         See Also          Example

Represents an indexed array of selected objects in a flow chart.

property SelectedObjects[Index:Integer] : TdxFcObject;

Description

Use SelectedObjects to access any selected object in a flow chart structure.  To determine the value of a valid Index, use SelectedObjectCount.

ReadOnly Property


TdxCustomFlowChart.TopEdge

TdxCustomFlowChart         See Also

Represents the topmost position of a window in chart coordinates.

property TopEdge : Integer;

Description

Use TopEdge to vertically scroll a flow chart’s window.  You can set any integer value, but this value must be within the current scroll range.  When creating a flow chart control, the scroll range is 0.  After creating and moving items, the top margin may produce a negative value.  This value also changes when using the Zoom property.  It is best to calculate a new TopEdge value relative to its current value.  To scroll the window towards an absolute top or bottom, use the TO_HOME and TO_END constants.

// Delphi

case Key of

  VK_UP: TopEdge := TopEdge - ClientHeight;  // Scroll one screen up

  VK_DOWN: TopEdge := TopEdge + ClientHeight;  // Scroll one screen down

  VK_PRIOR: TopEdge := TO_HOME;  // Scroll to top margin

  VK_NEXT: TopEdge := TO_END;  // Scroll to bottom margin

 . . .

end;

// C++ Builder

switch(Key){

 case VK_UP: dxFlowChart1->TopEdge = dxFlowChart1->TopEdge - ClientHeight; break; // Scroll one screen up

 case VK_DOWN: dxFlowChart1->TopEdge = dxFlowChart1->TopEdge + ClientHeight; break; // Scroll one screen down

 case VK_PRIOR: dxFlowChart1->TopEdge = TO_HOME; break; // Scroll to top margin

 case VK_NEXT: dxFlowChart1->TopEdge = TO_END; break; // Scroll to bottom margin

 . . .

};


TdxCustomFlowChart.Zoom

TdxCustomFlowChart         See Also

Specifies the scaling factor for item display.

property Zoom : Word;

Description

Set Zoom to shrink or expand images in a flow chart’s window.  This value must be set in percentages.  The default value is 100; All point coordinates and linear sizes are displayed as they are set by the application.  If Zoom is not 100, these values are recalculated respectively to a new scaling factor.  If the window is resized, the scaling factor is recalculated.

Setting Zoom to 0 forces the flow chart into "fit" mode.  In this mode, the scaling factor is calculated automatically to place the entire flow chart to fit window size.  Use the RealZoom property to obtain the real scaling factor in "fit" mode.


TdxCustomFlowChart.BeginUpdate

TdxCustomFlowChart         See Also

Prevents multiple screen repaints when updating the flow chart window.

procedure BeginUpdate;

Description

BeginUpdate prevents the screen from being repainted when items are added, deleted, or changed.  Use BeginUpdate to prevent screen repaints and to speed the processing time while making multiple changes in the flow chart.

Note: BeginUpdate disables repainting of the flow chart window until the EndUpdate method is called.  BeginUpdate and Endpdate methods work together to prevent numerous refresh events of a flow chart window.  Be sure to call EndUpdate for every call of the BeginUpdate method.


TdxCustomFlowChart.CanSelect

TdxCustomFlowChart         See Also

Determines whether a particular item within the flow chart can be selected.

function CanSelect(Item: TdxFcItem): Boolean; virtual;

Description

Returns True if a specified item can be selected.  To get proper results, the CanSelect method first determines whether the fcoCanSelect option is active and then generates the OnSelection event.


TdxCustomFlowChart.Changed

TdxCustomFlowChart         See Also

Generates an OnChange event.

procedure Changed(Item: TdxFcItem); virtual;

Description

It is a good practice to write an OnChange event handler in case something unexpected occurs when changing flow chart items.  The Item parameter determines the changed item.


TdxCustomFlowChart.ChartPoint

TdxCustomFlowChart         See Also

Converts window coordinates into the flow chart coordinates.

function ChartPoint(X,Y: Integer): TPoint;

Description

Use ChartPoint to access flow chart coordinates corresponding to a specified window’s coordinates.  X and Y are coordinates of the flow chart window client area.  ChartPoint converts them into native flow chart coordinates, according to the current zoom factor and scrolling position.

procedure Form1.ChartMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,Y: Integer);

var

  P: TPoint;

begin

  if (ssCtrl in Shift) and (Button = mbLeft) then

  begin

    P := Chart.ChartPoint(X,Y);   // Get chart point

    Chart.CreateObject(P.X,P.Y,60,40,fcsRectangle);   // Create object at

  end;   // specified point

end;


TdxCustomFlowChart.Clear

TdxCustomFlowChart         See Also

Deletes all items in a flow chart.

procedure Clear;

Description

Use Clear to remove all items managed by a flow chart and to empty the flow chart.


TdxCustomFlowChart.ClearSelection

TdxCustomFlowChart         See Also

Cancels selection of all selected items.

procedure ClearSelection;

Description

Use ClearSelection to remove selection of all items.  When ClearSelection is called, the OnSelected event is generated for each of the selected items.


TdxCustomFlowChart.Create

TdxCustomFlowChart         See Also

Creates a flow chart control.

constructor Create(AOwner: TComponent);  override;

Description

Creates and initializes a flow chart.  Flow chart controls placed onto forms at design time are created automatically.


TdxCustomFlowChart.CreateConnection

TdxCustomFlowChart         See Also          Example

Creates a new connection.

function CreateConnection(OSrc,ODst:TdxFcObject; PSrc,PDst:Byte): TdxFcConnection;

Description

Use CreateConnection to create a new connection between specified objects.  OSrc and ODst specify source and destination objects; PSrc and PDst specify linked points for these objects.  All other properties must be set separately or via the OnCreateItem event handler.  CreateConnection returns a newly created connection.


TdxCustomFlowChart.CreateObject

TdxCustomFlowChart         See Also

Creates a new object within a flow chart.

type

  TdxFcShapeType = (fcsNone, fcsRectangle, fcsEllipse, fcsRoundRect, fcsDiamond, fcsNorthTriangle, fcsSouthTriangle, fcsEastTriangle, fcsWestTriangle, fcsHexagon, fcsUser);

function CreateObject(L,T,W,H: Integer; AShape: TdxFcShapeType): TdxFcObject;

Description

Use CreateObject in order to create a new object with specified bounds and shape type.  Set the L and T parameters to specify left and top coordinates of the new object within a flow chart in pixels.  The W and H parameters determine width and height of the new object.  AShape specifies the shape of the created object.  In order to determine any other properties, you should use OnCreateItem event.  CreateObject returns a newly created object.  Descendants override this method to get objects of a new class.  They also have to override InternalCreateObject when overriding the CreateObject method.  The following code creates a new object of ellipse shape at the left top corner of a flow chart:

// Delphi

procedure TForm1.Button1Click(Sender: TObject);

var

  NewObject : TdxFcObject;

begin

  NewObject := dxFlowChart1.CreateObject(5, 5, 25, 25, fcsEllipse);

  NewObject.Text := 'New Object Text';

end;

// C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)

{

 TdxFcObject * NewObject;

 NewObject = dxFlowChart1->CreateObject(5, 5, 25, 25, fcsEllipse);

 NewObject->Text = "New Object Text";

};

Note: The L, T, W, H parameters are specified in flow chart coordinates, not in real coordinates based on a zoom ratio.


TdxCustomFlowChart.DefaultDrawObject

TdxCustomFlowChart         See Also

Draws a flow chart control on screen.

procedure DefaultDrawObject(AObject: TdxFcObject; R: TRect); virtual;

Description

This is the default drawing procedure for a flow chart control.  It is called, if the OnDrawObject event handler has not been defined.  DefaultDrawObject calls PaintImage and PaintText methods to draw image and text elements of AObject.  Descendants can override this method to draw a flow chart control in their own unique way.  The R parameter determines the rectangle to draw a flow chart control.

For objects with a user-defined shape (ShapeType is equal to fcsUser) the client area is defined as a rectangle between the first and eighth linked points.  Descendant controls, which implement such objects may need to override DefaultDrawObject to correct this area.


TdxCustomFlowChart.Delete

TdxCustomFlowChart         See Also

Generates an OnDeletion event.

procedure Delete(Item: TdxFcItem); virtual;

Description

This method is called before actual destruction of an Item.  If necessary, it cancels Item selection and generates an OnDeletion event handler.  Be sure to call the inherited method from the overridden method to completely delete Item.


TdxCustomFlowChart.DeleteConnection

TdxCustomFlowChart         See Also          Example

Removes a specified connection from a given flow chart control.

procedure DeleteConnection(AConnection: TdxFcConnection);

Description

Use DeleteConnection to delete a specific connection.  Use the OnDeletion event to respond to deletion of a particular connection.


TdxCustomFlowChart.DeleteObject

TdxCustomFlowChart         See Also

Removes a particular object from a flow chart.

procedure DeleteObject(AObject: TdxFcObject);

Description

Use DeleteObject to delete a separate object from the flow chart.  This method is similar to the Free method of AObject.  Use the OnDeletion event to respond to deletion of a particular object.  The following code deletes a selected object:

// Delphi

dxFlowChart1.DeleteObject(dxFlowChart1.SelectedObject);

// C++ Builder

dxFlowChart1->DeleteObject(dxFlowChart1->SelectedObject);


TdxCustomFlowChart.DeleteSelection

TdxCustomFlowChart         See Also

DeleteSelection deletes all selected items.

procedure DeleteSelection;

Description

Use DeleteSelection to remove all selected items from a flow chart.  Do not confuse it with ClearSelection: this method unselects items, but does not delete them.


TdxCustomFlowChart.Destroy

TdxCustomFlowChart         See Also

Destroys a flow chart control.

destructor Destroy;  override;

Description

Destroys a flow chart.  Before calling the inherited destructor, Destroy calls Clear to delete all flow chart items.  Do not call Destroy directly; use Free instead.  Manual deletion is required only for controls created at runtime via an explicit call of Create.


TdxCustomFlowChart.EndUpdate

TdxCustomFlowChart         See Also

EndUpdate re-enables screen repainting turned off by the BeginUpdate method.

procedure EndUpdate;

Description

BeginUpdate and EndUpdate work together to prevent multiple refresh events of the flow chart window when adding or deleting several items.  Use EndUpdate to enable screen updating after BeginUpdate has been called.  Be sure to call EndUpdate after each call of the BeginUpdate method.


TdxCustomFlowChart.GetConnectionAt

TdxCustomFlowChart         See Also

Returns a connection found at specified coordinates.

function GetConnectionAt(X,Y: Integer): TdxFcConnection;

Description

Call GetConnectionAt to access a connection at a position specified by the X and Y parameters.  X and Y specify a position relative to the top left corner of a flow chart window.  If there is no connection at the location specified by X and Y, GetConnectionAt returns nil.  It returns a particular connection, if a specified point is on the connection line, or connection text, or arrow shape, or selection point of a curved line.


TdxCustomFlowChart.GetHitTestAt

TdxCustomFlowChart         See Also

Returns an item which contains a specified point.

type

  TdxFcHitTest = set of (htNowhere, htByObject, htOnObject, htOnConnection, htOnConLabel, htOnArrowSrc, htOnArrowDst, htOnSelPoint);

function GetHitTestAt(X,Y: Integer): TdxFcHitTest;

Description

Use GetHitTestAt to determine what portion of a flow chart item, if any, is found under the point specified by X and Y parameters.  X and Y specify coordinates relative to the top left corner of the flow chart window.  Possible return values include:

Value	Meaning
htNowhere	No flow chart item is found.
htByObject	The point is inside the object rectangle.
htOnObject	The point is inside the object shape.  If this flag is set, htByObject is also set.
htOnConnection	The point is on the connection line.
htOnConLabel	The point is on the connection text.
htOnArrowSrc	The point is on the source arrow shape of the connection.
htOnArrowDst	The point is on the destination arrow shape of the connection.
htOnSelPoint	The point is on the selection point of a single selected object or connection.

To determine which flow chart item is found at a specified position, use GetObjectAt and GetConnectionAt.  TdxFcObject GetSelPoint and TdxFcConnection GetNearestPoint methods determine the selection point found.


TdxCustomFlowChart.GetObjectAt

TdxCustomFlowChart         See Also

Returns an object at specified coordinates.

function GetObjectAt(X,Y: Integer): TdxFcObject;

Description

Use GetObjectAt to determine a flow chart object under specified coordinates.  X and Y determine the coordinates relative to the top left corner of a flow chart window.  GetObjectAt returns a particular object, if a specified point belongs to the object rectangle; i.e. the point either belongs to an object shape or is located within an object.  If no object is found, GetObjectAt returns nil.


TdxCustomFlowChart.InternalCreateConnection

TdxCustomFlowChart         See Also

InternalCreateConnection creates a new "abstract" connection.

function InternalCreateConnection: TdxFcConnection; virtual;

Description

Creates a new connection and calls the OnCreateItem event handler if defined.  Descendants override this method to create connection of a new class, derived from TdxFcConnection.  Do not call this method directly; instead use CreateConnection.


TdxCustomFlowChart.InternalCreateObject

TdxCustomFlowChart         See Also

Creates a new object.

function InternalCreateObject: TdxFcObject; virtual;

Description

InternalCreateObject creates an "abstract" TdxFcObject instance and generates the OnCreateItem event.  Descendants can override this method to create objects of a new class, derived from TdxFcObject.  Do not call this method directly; instead use CreateObject.


TdxCustomFlowChart.KeyDown

TdxCustomFlowChart         See Also

Processes keyboard events.

type

  TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);

procedure KeyDown(var Key: Word; Shift: TShiftState);  override;

Description

After calling the inherited method, KeyDown processes the keys listed below:

Key	Function
Ctrl-Left	Scrolls one screen to the left.
Ctrl-Right	Scrolls one screen to the right.
Home	Scrolls to the left margin.
End	Scrolls to the right margin.
PgUp	Scrolls one screen up.
PgDn	Scrolls one screen down.
Ctrl-PgUp	Scrolls to the topmost margin.
Ctrl-PgDn	Scrolls to the bottom margin.
Ctrl-Home	Scrolls to the topmost left corner.
Ctrl-End	Scrolls to the to bottom right corner.
Arrow keys	Selects the next object in the arrow direction.  It should be single-selected and the fcoCanSelect option should be turned on.
Shift + arrows	Resizes a single-selected object, if the fcoCanDrag option is turned on.
Alt + arrows	Moves selected object(s), if the fcoCanDrag option is turned on.
Del	Deletes selected item(s), if the fcoCanDelete option is turned on.


TdxCustomFlowChart.LoadFromFile

TdxCustomFlowChart         See Also

Retrieves flow chart objects from a file specified by FileName.

procedure LoadFromFile(const FileName: String);

Description

Use LoadFromFile to retrieve flow chart items from a file and load it into the flow chart.  FileName entirely defines the name of a file.  Neither extensions nor path is added to the FileName parameter.

// Delphi

procedure TForm1.SpeedButton1Click(Sender : TObject);

begin

  dxFlowChart1.LoadFromFile(‘Figure.dat’);

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

 dxFlowChart1->LoadFromFile("Figure.dat");

};


TdxCustomFlowChart.LoadFromStream

TdxCustomFlowChart         See Also

LoadFromStream loads data from a stream into the flow chart.

procedure LoadFromStream(Stream: TStream); virtual;

Description

Use LoadFromStream to read flow chart items from a specified stream.  Use this method to retrieve data from file and load it into the flow chart.


TdxCustomFlowChart.SaveToFile

TdxCustomFlowChart         See Also

Saves the flow chart to a file specified by FileName.

procedure SaveToFile(const FileName: String);

Description

Use SaveToFile to store flow chart data to a file.  Items can be later reloaded from a file into a new flow chart object via the LoadFromFile method.  The FileName parameter entirely defines the file name; neither extensions nor additional path is added to FileName.

// Delphi

procedure TForm1.SpeedButton2Click(Sender : TObject);

begin

  dxFlowChart1.SaveToFile(‘Figure.dat’);

end;

// C++ Builder

void __fastcall TForm1::SpeedButton2Click(TObject *Sender)

{

  dxFlowChart1->SaveToFile("Figure.dat");

};


TdxCustomFlowChart.SaveToStream

TdxCustomFlowChart         See Also

Writes flow chart data to a stream passed as the Stream parameter.

procedure SaveToStream(Stream: TStream); virtual;

Description

Use the SaveToStream method to stream out flow chart data.  It can be streamed back into another flow chart object via the LoadFromStream method.  SaveToStream is also used in DefineProperties to store data in a form file.


TdxCustomFlowChart.SelCount

TdxCustomFlowChart         See Also

Returns the total number of selected items.

function SelCount: Integer;

Description

Use SelCount to determine the state of a current selection.  If the return value is 0, there are no selected items; if it is 1, there is one single-selected item; if it is more than 1, the flow chart is in multi-select state.


TdxCustomFlowChart.Select

TdxCustomFlowChart         See Also

Generates an OnSelected event.

procedure Select(Item: TdxFcItem); virtual;

Description

This method is called when changing the selection within a flow chart control.  TdxCustomFlowChart descendants can override this method to provide additional actions when changing item selection.  When overriding be sure to call the inherited Select to generate the OnSelected event.


TdxCustomFlowChart.SelectAll

TdxCustomFlowChart         See Also

Selects all items in a flow chart.

procedure SelectAll;

Description

Use SelectAll to select all flow chart items.  When SelectAll is called, OnSelection and OnSelected events are generated for each unselected item.


TdxCustomFlowChart.SetLeftTop

TdxCustomFlowChart         See Also

Sets LeftEdge and TopEdge properties.

procedure SetLeftTop( ALeft, ATop: Integer);

Description

Use SetLeftTop to scroll a window both in horizontal and vertical directions at a time.  It produces the same effect as separate setting of LeftEdge and TopEdge, but works quicker and provides more accurate scrolling.  Use TO_HOME and TO_END constants to scroll to margin positions.

// Delphi

case Key of

  VK_HOME: SetLeftTop(TO_HOME,TO_HOME); // Scroll to top left corner

  VK_END: SetLeftTop(TO_END,TO_END);   // Scroll to bottom right corner

 . . .

end;

// C++ Builder

switch(Key){

 case VK_HOME: dxFlowChart1->SetLeftTop(TO_HOME,TO_HOME); break; // Scroll to top left corner

 case VK_END: dxFlowChart1->SetLeftTop(TO_END,TO_END); break;  // Scroll to bottom right corner

 . . .

};


TdxCustomFlowChart.OnChange

TdxCustomFlowChart         See Also

Occurs when changing items within a flow chart.

type

  TdxFcEvent = Procedure( Sender: TdxCustomFlowChart; Item: TdxFcItem) of object;

property OnChange: TdxFcEvent

Description

Write an OnChange event handler to perform actions when changing one of the flow chart items.  The Item parameter determines the changed item.

Note: OnChange is not generated when the Selected property changes.  Use OnSelection and OnSelected events to monitor selection state.


TdxCustomFlowChart.OnCreateItem

TdxCustomFlowChart         See Also

Occurs when creating a new item.

type

  TdxFcEvent = Procedure(Sender:TdxCustomFlowChart; Item:TdxFcItem) of object;

property OnCreateItem: TdxFcEvent;

Description

Write an OnCreateItem event handler to set predefined properties of a newly created object or connection.  For instance:

procedure TForm1.ChartCreateItem(Sender:TdxCustomFlowChart; Item:TdxFcItem);

begin

  if Item is TdxFcObject then

    with TdxFcObject(Item) do

    begin

      ShapeColor := clRed;

      BkColor := clYellow;

      HorzImagePos := fchpLeft;

    end

  else

    with TdxFcConnection(Item) do

    begin

      ArrowSource.Width := 6;

      ArrowSource.Height := 6;

      ArrowSource.ArrowType := fcaEllipse;

      ArrowDest.Width := 10;

      ArrowDest.Height := 3;

      ArrowDest.ArrowType := fcaArrow;

      Color := clBlue;

    end;

end;

// C++ Builder

void __fastcall TForm1::dxFlowChart1CreateItem(TdxCustomFlowChart *Sender, TdxFcItem *Item)

{

 AnsiString type_name = Item->ClassName();

 if( type_name == "TdxFcObject" )

   {

     ((TdxFcObject *)Item)->ShapeColor = clRed;

     ((TdxFcObject *)Item)->BkColor = clYellow;

     ((TdxFcObject *)Item)->HorzImagePos = fchpLeft;

   }

 else

   {

     ((TdxFcConnection *)Item)->ArrowSource->Width = 6;

     ((TdxFcConnection *)Item)->ArrowSource->Height = 6;

     ((TdxFcConnection *)Item)->ArrowSource->ArrowType = fcaEllipse;

     ((TdxFcConnection *)Item)->ArrowDest->Width = 10;

     ((TdxFcConnection *)Item)->ArrowDest->Height = 3;

     ((TdxFcConnection *)Item)->ArrowDest->ArrowType = fcaArrow;

     ((TdxFcConnection *)Item)->Color = clBlue;

   };

};


TdxCustomFlowChart.OnDeletion

TdxCustomFlowChart         See Also

Occurs when an item is about to be deleted.

type

  TdxFcEvent = Procedure(Sender: TdxCustomFlowChart; Item: TdxFcItem) of object;

property OnDeletion: TdxFcEvent;

Description

Write an OnDeletion event handler to respond when an item is deleted from a flow chart control. It is called before actual deletion.


TdxCustomFlowChart.OnDrawObject

TdxCustomFlowChart         See Also

Occurs when drawing an object within the flow chart.

type

  TdxFcDrawEvent = Procedure(Sender: TdxCustomFlowChart; AObject: TdxFcObject; R:TRect) of object;

property OnDrawObject: TdxFcDrawEvent;

Description

The OnDrawObject event allows an application to draw a particular object in its own unique way.  If the OnDrawObject event handler has been assigned, it is called after drawing object shape.  Otherwise, the DefaultDrawObject method is called.  The OnDrawObject event handler has to completely draw AObject.  The R parameter determines the rectangle for drawing.  You may use  TdxFcObject PaintImage and PaintText methods to draw AObject within the OnDrawObject event handler.


TdxCustomFlowChart.OnSelected

TdxCustomFlowChart         See Also

Occurs when item selection has just changed.

type

  TdxFcEvent = Procedure(Sender: TdxCustomFlowChart; Item: TdxFcItem) of object;

property OnSelected: TdxFcEvent;

Description

Use the OnSelected event handler to perform actions when changing the state of a selected item.  It can examine the Selected property to determine whether the Item parameter has been selected or unselected.  The Item parameter determines an item within a flow chart control.


TdxCustomFlowChart.OnSelection

TdxCustomFlowChart         See Also

Occurs when Item is about to be selected.

type

  TdxFcAllowEvent = Procedure(Sender:TdxCustomFlowChart; Item:TdxFcItem; var Allow:Boolean) of object;

property OnSelection: TdxFcAllowEvent;

Description

Write an OnSelection event handler to determine whether a specified item can be selected.  The Allow parameter contains the value of the fcoCanSelect option.  The OnSelection event handler can set Allow to True/False to enable/disable Item selection.

Note: Unlike OnSelected, OnSelection is not generated when an item loses selection.


TdxFcConnection

Hierarchy          Properties         Methods

Describes an individual connection within the flow chart.

Unit

dxflchrt

TdxFcConnection = class(TdxFcItem);

Description

Connection is a line that generally links two objects.  Each connection can have its own line style and width, drawing style, color, and up to two arrow shapes.  Additionally, it can have any number of intermediate points to build a line.  The flow chart also allows to display"hanging" connections, which are linked only with one object.


Hierarchy

TObject

     |

TdxFcItem

     |


Properties for TdxFcConnection
TdxFcConnection Properties

TdxFcConnection          Legend

TdxFcConnection

ArrowDest

ArrowSource

Color

ObjectDest

ObjectSource

PenStyle

PenWidth

PointCount

PointDest

Points

PointSource

RealPoints

Style

Transparent

Derived from TdxFcItem

Destroying

Font

Owner

ParentFont

RealFont

Selected

Text


Methods for TdxFcConnection
TdxFcConnection Methods

TdxFcConnection          Legend

TdxFcConnection

AddPoint

Create

Destroy

GetNearestPoint

InsertPoint

Load

RemovePoint

Save

SetObjectDest

SetObjectSource

Derived from TdxFcItem

FontChanged

Invalidate

SelList

SetText


TdxFcConnection.ArrowDest

TdxFcConnection         See Also          Example

Specifies the destination arrow of a connection.

property ArrowDest : TdxFcConnectionArrow;

Description

Use ArrowDest to specify a particular style of the destination arrow of a connection.  The destination arrow style is described by a TdxFcConnectionArrow object.  This object is created upon the creation of a connection and cannot be nil.


TdxFcConnection.ArrowSource

TdxFcConnection         See Also          Example

Specifies the style of the source arrow.

property ArrowSource : TdxFcConnectionArrow;

Description

Use ArrowSource to specify a particular style for the source arrow of a connection.  The source arrow is described by a TdxFcConnectionArrow object.  This object is created upon the creation  of a connection and cannot be nil.


TdxFcConnection.Color

TdxFcConnection         See Also          Example

Determines the color of a connection.

property Color : TColor;

Description

Use the Color property to specify the color of a connection.  This color is also used for drawing arrows and arrow shapes.  Choose Color from the toolbar palette of the flow chart editor or use connection customizing form to change it.


TdxFcConnection.ObjectDest

TdxFcConnection         See Also

Specifies a destination object for a connection.

property ObjectDest : TdxFcObject;

Description

Use ObjectDest to determine a destination object to which a given connection is linked.  A destination object is an object within a flow chart to which a connection is linked by one of its edges.  If connection has a specified destination object, then it is automatically resized when destination object moves.  The connection can link to a destination object at one of the 16 predefined link points.  If ObjectDest is nil, connection has no destination object.  Use the SetObjectDest method to change the value of this property.

ReadOnly Property


TdxFcConnection.ObjectSource

TdxFcConnection         See Also

Specifies a source object for a connection.

property ObjectSource : TdxFcObject;

Description

Use ObjectSource to determine a source object to which a given connection is linked.  The source object is an object within a flow chart to which a given connection is linked by one of its edges.  If connection is linked to an object, then its size is automatically changed when this object moves.  If ObjectSource is nil, the connection has no source object.  Use the SetObjectSource to change the ObjectSource value.

ReadOnly Property


TdxFcConnection.PenStyle

TdxFcConnection         See Also

Specifies the pen style for connection drawing.

type

  TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame);

property PenStyle : TPenStyle;

Description

Use PenStyle to specify how a connection is drawn.  It can include a solid line, a dashed line, a dotted line or any other standard TPen style:

Value	Meaning
psSolid	A solid line.
psDash	A line made up of a series of dashes.
psDot	A line made up of a series of dots.
psDashDot	A line made up of alternating dashes and dots.
psDashDotDot	A line made up of a serious of dash-dot-dot combinations.
psClear	No line is drawn (used to omit the line around shapes that draw an outline using the current pen).
psInsideFrame	A solid line, but one that may use a dithered color if Width is greater than 1.

Note: Only the psInsideFrame style will produce a dithered color to match the Color property that is not in the color table.  All others choose the closest color from the Windows color table.  Dotted or dashed pen styles are not available when the PenWidth property is not equal to 1.


TdxFcConnection.PenWidth

TdxFcConnection         See Also

Specifies the width (in pixels) of the pen used to draw a connection.

property PenWidth: Integer;

Description

Use PenWidth to specify the width (in pixels) of the pen used to draw a connection.  Use the PenStyle property to specify how a connection is drawn.


TdxFcConnection.PointCount

TdxFcConnection         See Also

Determines the total number of a connection’s intermediate points.

property PointCount : Integer;

Description

Use PointCount to determine the number of points a connection includes (source and destination points are excluded).  If a connection has two linked objects and PointCount is equal to 0, it is a straight line; if PointCount is greater than 0, it is a polyline.  If a connection has only one linked object, it must have at least one point; if it has no linked objects, it must have at least two points.  The PointCount property changes when adding and removing points to/from the connection.

ReadOnly Property


TdxFcConnection.PointDest

TdxFcConnection         See Also

Determines a linked point of the destination object to which a connection is linked.

property PointDest : Byte;

Description

Returns a value from 0 to 15 that determines at which point of ObjectDest a given connection is linked.  The TdxFcObject linked points are enumerated in the following order:

If the connection has no destination object, the PointDest value is meaningless.  Use the SetObjectDest method to change PointDest.

ReadOnly Property


TdxFcConnection.Points

TdxFcConnection         See Also

Represents an indexed array of a connection's intermediate points.

property Points[Index:Integer] : TPoint;

Description

Use Points to read coordinates of a connection's intermediate points or set its new coordinates.  Points are enumerated sequentially from source to destination.  Points of linked objects are not included in this list: they belong to objects, but not to the connection.  The total number of intermediate points is described by the PointCount property.  Unlike RealPoints, the Points property specifies coordinates within a flow chart, that is, these coordinates are not changed when a user changes the zoom ratio.


TdxFcConnection.PointSource

TdxFcConnection         See Also

Determines a linked point of the source object to which a connection is linked.

property PointSource : Byte;

Description

PointSource contains values from 0 to 15 that determines at which point of ObjectSource a given connection is linked.  TdxFcObject’s linked points are enumerated in the following order:

If the connection has no source object, the PointSource value is meaningless.  Use the SetObjectSource method to change PointSource.

ReadOnly Property


TdxFcConnection.RealPoints

TdxFcConnection         See Also

Represents an indexed array of a connection's intermediate points in a zoomed flow chart.

property RealPoints[Index:Integer] : TPoint;

Description

TdxFcConnection descendants can use the RealPoints property to read the real coordinates of intermediate points based on zoom ratio.  The total number of the RealPoints array is described by the PointCount property.  Unlike Points, the RealPoints property specifies coordinates of intermediate points according to the zoom ratio.

ReadOnly Property


TdxFcConnection.Style

TdxFcConnection         See Also          Example

Determines the drawing style of a connection.

type

  TdxFclStyle = (fclStraight, fclCurved, fclRectH, fclRectV);

property Style : TdxFclStyle;

Description

Use Style to specify how a connection appears on screen.  The following values are available:

Value	Meaning
fclStraight	Standard polyline.
fclCurved	Smooth curve (parabolic line).
fclRectH	Horizontal rectangle polyline.
fclRectV	Vertical rectangle polyline.

Horizontal and vertical rectangular polylines differ only in drawing order.  For fclRectH any two points are linked first by a horizontal and then by a vertical line; for fclRectV they are linked vice versa:

fclRectH	fclRectV


TdxFcConnection.Transparent

TdxFcConnection         See Also

Specifies the overlapping order of a connection and objects.

property Transparent : Boolean;

Description

Transparent is meaningful only when a connection intersects object shape.  If Transparent is True, an object overlaps the connection; if False, the connection is drawn over an object.


TdxFcConnection.AddPoint

TdxFcConnection         See Also

Adds a new point to a connection.

procedure AddPoint(Pt: TPoint);

Description

Creates a new intermediate point and adds it to the end of the intermediate points array, specified by the TdxFcConnection Points property.  Use AddPoint to add a new point to the end of the Points list.  Use InsertPoint to add a new point to a specified position.


TdxFcConnection.Create

TdxFcConnection         See Also

Creates an instance of type TdxFcConnection.

constructor Create(AOwner: TdxCustomFlowChart);

Description

Creates and initializes TdxFcConnection properties.  A direct call of Create may be required only within the overridden InternalCreateConnection method of a TdxCustomFlowChart descendants.  Generally, your application should use the CreateConnection method to create a connection.


TdxFcConnection.Destroy

TdxFcConnection

Destroys an instance of type TdxFcConnection and releases any memory it allocates.

destructor Destroy;  override;

Description

The Destroy method first removes the connection from all flow chart and object lists, then calls inherited Destroy.  Do not call Destroy directly; instead use Free.


TdxFcConnection.GetNearestPoint

TdxFcConnection         See Also

Returns index of the nearest intermediate point to a specified point.

function GetNearestPoint(X,Y: Integer): Integer;

Description

Use GetNearestPoint to determine which point of a connection is the nearest to a given point.  X and Y are the flow chart client area coordinates.  GetNearestPoint returns the index of the intermediate point in the Points array.  GetNearestPoint returns  -1, if the nearest point is a point on a source object; GetNearestPoint returns PointCount, if the nearest point is on a destination object.


TdxFcConnection.InsertPoint

TdxFcConnection         See Also

Inserts a new intermediate point to the connection points list.

procedure InsertPoint(Index: Integer; Pt: TPoint);

Description

The InsertPoint method creates a new intermediate point and inserts it in the Points array of TdxFcConnection.  The Index parameter determines the index of a new point in the Points array.  The Index value should be in a range from 0 to PointCount.  If Index is equal to PointCount, InsertPoint is equivalent to AddPoint.


TdxFcConnection.Load

TdxFcConnection         See Also

Reads TdxFcConnection properties from the stream.

procedure Load(Stream: TStream);  virtual;

Description

TdxFcConnection descendants can override Load to read additional properties.  The overridden Load must first call the inherited Load and then read additional data.  The Load method is called automatically within the TdxCustomFlowChart LoadFromStream method.  Do not call Load directly.


TdxFcConnection.RemovePoint

TdxFcConnection         See Also

Removes a point from the connection points.

procedure RemovePoint(Index: Integer);

Description

Use RemovePoint to remove a particular intermediate point from the Points list.  The Index parameter specifies the index of the removed point.


TdxFcConnection.Save

TdxFcConnection         See Also

Writes connection properties to a specified stream.

procedure Save(Stream: TStream);  virtual;

Description

TdxFcConnection descendants can override Save to write additional properties to Stream.  When overriding, first call the inherited method and then write additional data.  Do not call Save directly; It is called automatically from the TdxCustomFlowChart SaveToStream method.


TdxFcConnection.SetObjectDest

TdxFcConnection         See Also

Sets a destination object for a connection.

procedure SetObjectDest(AObject: TdxFcObject; APoint: Byte);

Description

Use SetObjectDest to set ObjectDest and PointDest properties for a given connection.  The connection is linked to AObject, as the destination object via a linked point specified by APoint.  APoint should be from 0 to 15.  If AObject is nil, the connection has no destination object and the APoint value is ignored.


TdxFcConnection.SetObjectSource

TdxFcConnection         See Also

Sets a source object for a connection.

procedure SetObjectSource(AObject: TdxFcObject; APoint: Byte);

Description

Use SetObjectSource to set ObjectSource and PointSource properties for a given connection.  The SetObjectSource method sets AObject as the source object of a connection, via a linked point specified by APoint.  APoint should be from 0 to 15.  If AObject is nil, the connection has no source object and the APoint value is ignored.


TdxFcConnectionArrow

Hierarchy          Properties         Methods

Determines the style of TdxFcConnection edges.

Unit

dxflchrt

TdxFcConnectionArrow = class(TObject);

Description

TdxFcConnectionArrow is an additional class, which describes the style of connection edges.  It may be a real arrow, or a rectangle or an ellipse with a specified width, height and color.  TdxFcConnectionArrow objects are created by TdxFcConnection and are not implemented for separate use.  Any TdxFcConnection object contains two TdxFcConnectionArrow objects.


Hierarchy

TObject

     |


Properties for TdxFcConnectionArrow
TdxFcConnectionArrow Properties

TdxFcConnectionArrow          Legend

TdxFcConnectionArrow

ArrowType

Color

Height

Owner

Width


Methods for TdxFcConnectionArrow
TdxFcConnectionArrow Methods

TdxFcConnectionArrow          Legend

TdxFcConnectionArrow

Create

Destroy


TdxFcConnectionArrow.ArrowType

TdxFcConnectionArrow          Example

Specifies the edge type of a connection.

type

  TdxFcaType = (fcaNone, fcaArrow, fcaEllipse, fcaRectangle);

property ArrowType : TdxFcaType;

Description

Use ArrowType to specify how the connection edge should be displayed.

There are four possible values:

Value	Meaning
fcaNone	Nothing is drawn (default).
fcaArrow	Real arrow.
fcaEllipse	Ellipse or circle.
fcaRectangle	Rectangle or square.


TdxFcConnectionArrow.Color

TdxFcConnectionArrow         See Also

Determines the background color for ellipse and rectangular arrow shapes.

property Color : TColor;

Description

Use Color to specify the fill color for ellipses and rectangles.  This property is meaningless for a TdxFcConnectionArrow object of fcaArrow or fcaNone style.  The color for drawing fcaArrow-styled edges and other shapes is always defined by the Owner Color property.  The foreground color of the connection arrow is the same as color of the connection.


TdxFcConnectionArrow.Height

TdxFcConnectionArrow         See Also

Determines the height of a TdxFcConnectionArrow object.

property Height : Byte;

Description

Use Height to specify height in screen pixels.  This value should be set for the natural size of a chart (TdxFlowChart Zoom property is equal to 100).  For ellipses and rectangular edges, the Height property is the real height; for arrow edges, it is the height of the horizontal arrow.


TdxFcConnectionArrow.Owner

TdxFcConnectionArrow         See Also

Specifies the connection-owner of a TdxFcConnectionArrow object.

property Owner : TdxFcConnection;

Description

Use Owner to determine the TdxFcConnection object to which a given TdxFcConnectionArrow belongs.

ReadOnly Property


TdxFcConnectionArrow.Width

TdxFcConnectionArrow         See Also

Determines the width of a TdxFcConnectionArrow object.

property Width : Byte;

Description

Use this property to specify TdxFcConnectionArrow width in screen pixels.  This value must be set for the natural size of a flow chart (TdxFlowChart Zoom property is 100).  For ellipse- and rectangle-styled edges, Width is the real width; for arrow-styled edges, it is the width of the horizontal arrow (i.e. the length of its middle line).


TdxFcConnectionArrow.Create

TdxFcConnectionArrow

Creates an instance of type TdxFcConnectionArrow.

constructor Create(AOwner: TdxFcConnection);

Description

The Create method creates and initializes the TdxFcConnectionArrow object.  It is called within the TdxFcConnection Create method.  Do not call it directly.


TdxFcConnectionArrow.Destroy

TdxFcConnectionArrow         See Also

Destroys an instance of type TdxFcConnectionArrow.

destructor Destroy; override;

Description

Destroys the TdxFcConnectionArrow object and releases any memory it allocates.  The TdxFcConnectionArrow Destroy method is called within TdxFcConnection Destroy.  Do not call it directly.


TdxFcItem

Hierarchy         Properties        Methods         See Also

Unit

dxflchrt

TdxFcItem = class(TObject);

Description

TdxFcItem is a common ancestor of TdxFcObject and TdxFcConnection.  It provides fundamental methods and properties for both classes.  Never create an instance of TdxFcItem directly; instead create its TdxFcObject and TdxFcConnection descendants.


Hierarchy

TObject


Properties for TdxFcItem
TdxFcItem Properties

TdxFcItem         Legend

TdxFcItem

Destroying

Font

Owner

ParentFont

 	RealFont

Selected

Text

TdxFcItem Methods

TdxFcItem          Legend

TdxFcItem

Create

Destroy

FontChanged

Invalidate

SelList

SetText


TdxFcItem.Destroying

TdxFcItem         See Also

Determines whether an item is about to be destroyed.

property Destroying : Boolean;

Description

Use Destroying to determine if an item is in the process of being destroyed.  This property is set to True before calling the Destroy method of an item.

ReadOnly Property


TdxFcItem.Font

TdxFcItem         See Also

Specifies characteristics of the font used for the drawing of item text.

property Font : TFont;

Description

Use to specify the font for drawing item text.  By default, Font is the same as that of a control's owner.  You can specify another font either by changing separate properties of the Font object or by assigning a new TFont object to the Font property.  In the design-time editor, a new font can be set via the pop-up menu.

Note: When the Zoom property of the flow chart changes, the font size of an item is scaled respectively to the new zoom ratio.  This scaling works best if an item uses a true-type font.


TdxFcItem.Owner

TdxFcItem

Specifies the TdxCustomFlowChart object that contains a given item.

property Owner : TdxCustomFlowChart;

Description

Use Owner to determine the TdxCustomFlowChart component that owns a given item.

ReadOnly Property


TdxFcItem.ParentFont

TdxFcItem         See Also

ParentFont determines where an item obtains its font information.

property ParentFont : Boolean;

Description

Set ParentFont to True to force an item to use the same font as its Owner.  If ParentFont is False, the item uses its own Font property.  When changing any Font, the sub-property automatically sets ParentFont to False.


TdxFcItem.RealFont

TdxFcItem         See Also

Determines the real font used for drawing an object within the flow chart window.

property RealFont : TFont;

Description

This property is used internally.  It specifies the font used for drawing an object within the flow chart window.  RealFont is the same as the font defined by the Font property, but the size of RealFont changes according to the zoom ratio of the flow chart window.


TdxFcItem.Selected

TdxFcItem         See Also

Determines whether an item is selected.

property Selected : Boolean;

Description

Set Selected to True to select an item or to False to cancel selection.  The selected item can be moved, resized or deleted by the mouse or keys, if its parent flow chart has appropriate options set.  Selection of one item can cancel selection of other items if the TdxFcFlowChart fsoMultiSelect option is turned off.  When an item is selected, TdxFcFlowChart OnSelection and OnSelected events are generated.


TdxFcItem.Text

TdxFcItem         See Also          Example

Represents a text string associated with an item.

property Text : String;

Description

Use Text to specify a string, which identifies a given item to a user.  The Text property can either be a single-line or multi-line string.  For objects, a text string is displayed within the object's client area and wraps within its margins.  For connections, text is placed relative to the center of the connection line and does not automatically wrap.


TdxFcItem.Create

TdxFcItem         See Also

Creates an instance of type TdxFcItem.

constructor Create(AOwner: TdxCustomFlowChart);

Description

Creates and initializes an object of type TdxFcitem.  Do not call it directly.  Instead, use CreateObject and CreateConnection methods of the TdxCustomFlowChart object.


TdxFcItem.Destroy

TdxFcItem         See Also

Destroys an instance of the TdxFcItem object.

destructor Destroy;  override;

Description

Destroys an object of type TdxFcItem and releases any memory it allocates.


TdxFcItem.FontChanged

TdxFcItem

Provides an interface called when changing the Font property of an item.

procedure FontChanged; virtual;

Description

This method is called when changing the Font property of an item.  Descendants override it to correctly respond to font changes.


TdxFcItem.Invalidate

TdxFcItem

Points Windows to repaint an item on screen.

procedure Invalidate; virtual; abstract;

Description

TdxFcItem introduces an abstract Invalidate method.  It is used internally if necessary to repaint an item.  Descendants override this method to redraw an item.


TdxFcItem.SelList

TdxFcItem         See Also

Provides an interface, which returns a list of selected items.

function SelList: TList;  virtual; abstract;

Description

TdxFcItem introduces an abstract SelList method.  SelList is used internally to retrieve a list of objects, selected in the flow chart.  It returns selected objects of the same type as contained in a given item.  For instance, the TdxFcObject SelList method returns a list of selected objects; the TdxFcConnection SelList returns a list of selected connections.


TdxFcItem.SetText

TdxFcItem

Provides an interface which sets the text property of an item.

procedure SetText(Value: String);  virtual; abstract;

Description

TdxFcItem introduces an abstract SetText method.  The purpose of SetText is to set the Text property of items in the flow chart.  This method is used internally.  Descendants override it to set their Text property.


TdxFcObject

Hierarchy          Properties        Methods

TdxFcObject describes an individual object within a flow chart.

Unit

dxflchrt

TdxFcObject = class(TdxFcItem);

Description

Presents the basic building blocks of a flow chart.  Each object can have its own location, size, shape, color, bitmap image, text and font.  Any object can be linked with other objects via connections.  Objects can be merged to form object unions (Group of Objects).  All objects comprising a union, move together when one of the grouped objects moves.


Hierarchy

TObject

     |

TdxFcItem

     |


Properties for TdxFcObject
TdxFcObject Properties

TdxFcObject          Legend

TdxFcObject

BkColor

BorderStyle

ConnectionCount

Connections

CustomData

Data

EdgeStyle

Height

HorzImagePos

HorzTextPos

ImageIndex

IsUnion

Left

LinkedObjectCount

LinkedObjects

ObjectCount

Objects

RealHeight

RealLeft

 	RealSW

RealTop

RealWidth

ShapeColor

ShapeStyle

ShapeType

ShapeWidth

Tag

Top

Transparent

VertImagePos

VertTextPos

Visible

Width

ZOrder

Derived from TdxFcItem

Destroying

Font

Owner

ParentFont

 	RealFont

Selected

Text

TdxFcObject Methods

TdxFcObject          Legend

TdxFcObject

AddToUnion

BringToFront

ClearUnion

Create

Destroy

GetLinkedPoint

GetSelPoint

HasInUnion

Load

MakeVisible

PaintImage

PaintText

PutInFrontOf

RemoveFromUnion

Save

SelectUnion

SendToBack

SetBounds

UserLinkedPoints

UserRegion

Derived from TdxFcItem

FontChanged

Invalidate

SelList

SetText


TdxFcObject.BkColor

TdxFcObject         See Also

Determines the background style of TdxFcObject.

property BkColor : TColor;

Description

Use BkColor to specify the interior fill color of an object shape.  In the design-time editor, BkColor can be set by setting the background color in the flow chart editor or via the object customizing form.

Note: BkColor is ignored if the Transparent property is True, or if TdxFcObject has no border, (the ShapeType property is fcsNone).


TdxFcObject.BorderStyle

TdxFcObject         See Also

Specifies the border style for TdxFcObject.

property BorderStyle : Word;

Description

Determines how an object draws its 3D border.  The BorderStyle value is a combination of bit flags listed below.

Value	Meaning
BF_ADJUST	Rectangle adjusted to leave space for client area.
BF_BOTTOM	Bottom of border rectangle.
BF_BOTTOMLEFT	Bottom and left side of border rectangle.
BF_BOTTOMRIGHT	Bottom and right side of border rectangle.
BF_DIAGONAL	Diagonal border.
BF_DIAGONAL_ENDBOTTOMLEFT	Diagonal border.  The end point is the bottom-left corner of the rectangle; the start point is the top-right corner.
BF_DIAGONAL_ENDBOTTOMRIGHT	Diagonal border.  The end point is the bottom-right corner of the rectangle; the start point is the top-left corner.
BF_DIAGONAL_ENDTOPLEFT	Diagonal border.  The end point is the top-left corner of the rectangle; the start point is the bottom-right corner.
BF_DIAGONAL_ENDTOPRIGHT	Diagonal border.  The end point is the top-right corner of the rectangle; the start point is the bottom-left corner.
BF_FLAT	Flat border.
BF_LEFT	Left side of border rectangle.
BF_MIDDLE	Interior of rectangle to be filled.
BF_MONO	One-dimensional border.
BF_RECT	Entire border rectangle.
BF_RIGHT	Right side of border rectangle.
BF_SOFT	Soft buttons instead of tiles.
BF_TOP	Top of border rectangle.
BF_TOPLEFT	Top and left side of border rectangle.
BF_TOPRIGHT	Top and right side of border rectangle.
By default, the BorderStyle property is BF_RECT.

Note: BorderStyle is available only for rectangular objects with 3D border.  For other objects, this property is ignored.


TdxFcObject.ConnectionCount

TdxFcObject         See Also

Returns the total number of connections linked with a given object.

property ConnectionCount : Integer;

Description

Use ConnectionCount to determine the number of connections linked with a given object.  This value includes the total number, regardless of whether a given object is a source or a destination object for the connection.  Use it to iterate through all connections of a given object, for example:

// Delphi

for I:=0 to dxFlowChart1.SelectedObject.ConnectionCount-1 do

  if dxFlowChart1.SelectedObject.Connections[I].ObjectSource = dxFlowChart1.SelectedObject then

    dxFlowChart1.SelectedObject.Connections[I].Color := clRed;

// C++ Builder

for(i=0;i<dxFlowChart1->SelectedObject->ConnectionCount;i++)

   if(dxFlowChart1->Connections[i]->ObjectSource == dxFlowChart1->SelectedObject)

     dxFlowChart1->SelectedObject->Connections[i]->Color = clRed;

ReadOnly Property


TdxFcObject.Connections

TdxFcObject         See Also

Represents an indexed array of connections linked with a given object.

property Connections[Index:Integer] : TdxFcConnection;

Description

Use Connections to determine which connections are linked to a given object.  This array includes all connections for which a given object is a source or a destination object.  The Connections property changes automatically when creating and deleting connections and additionally when linking connections with objects.  The index of the first connection in the array is zero.  Use ConnectionCount to determine the total number of connections, linked with a given object.

ReadOnly Property


TdxFcObject.CustomData

TdxFcObject         See Also

Specifies an additional text string, associated with an object.

property CustomData : String;

Description

Use CustomData to identify an object by a user-specified text string.  This string is not displayed within the object, nor it is used by TdxFcObject and TdxCustomFlowChart methods.  However, it is saved and loaded together with the object.


TdxFcObject.Data

TdxFcObject         See Also

Returns a pointer to any data, associated with an object.

property Data : Pointer;

Description

Use Data to associate an object with an application-defined data structure.  This property is not used by component methods, nor is it saved together with the object.


TdxFcObject.EdgeStyle

TdxFcObject         See Also

EdgeStyle specifies the 3D border style of an object.

property EdgeStyle : Word;

Description

Use EdgeStyle to specify the type of inner and outer edge for an object.  This value should be a combination of an inner-border flag and outer-border flag.

The inner-border flags are as follows:

BDR_RAISEDINNER	Raised inner edge.
BDR_SUNKENINNER	Sunken inner edge.

The outer-border flags are as follows:

BDR_RAISEDOUTER	Raised outer edge.
BDR_SUNKENOUTER	Sunken outer edge.

Alternatively, the edge parameter can specify one of the following flags:

EDGE_BUMP	Combination of BDR_RAISEDOUTER and BDR_SUNKENINNER.
EDGE_ETCHED	Combination of BDR_SUNKENOUTER and BDR_RAISEDINNER.
EDGE_RAISED	Combination of BDR_RAISEDOUTER and BDR_RAISEDINNER.
EDGE_SUNKEN	Combination of BDR_SUNKENOUTER and BDR_SUNKENINNER.

Note: EdgeStyle is available only for rectangular objects.  For other objects, this property is ignored.


TdxFcObject.Height

TdxFcObject         See Also

Specifies the height of an object's shape on screen.

property Height : Word;

Description

Use this property to specify the height for an object.  This value must be set in pixels for the natural size of a chart (Zoom factor is 100).  Use RealHeight to determine the real height.


TdxFcObject.HorzImagePos

TdxFcObject         See Also

Determines the horizontal position of an object's image.

type

  TdxFcHorzPos = (fchpLeft, fchpCenter, fchpRight);

property HorzImagePos : TdxFcHorzPos;

Description

Use HorzImagePos and VertImagePos to determine the horizontal layout of an associated image within the client area of an object.  The combination of HorzImagePos and VertImagePos provides nine possible positions.


TdxFcObject.HorzTextPos

TdxFcObject         See Also

Determines horizontal position of object text.

type

  TdxFcHorzPos = (fchpLeft, fchpCenter, fchpRight);

property HorzTextPos : TdxFcHorzPos;

Description

Use HorzTextPos and VertTextPos to determine horizontal layout of text within the client area of an object.  The combination of HorzTextPos and VertImagePos provides nine possible positions.  Additionally HorzTextPos defines the text aligned within the client rectangle: by the left edge, centering, or by the right edge.


TdxFcObject.ImageIndex

TdxFcObject         See Also

Specifies an image associated with a given object.

property ImageIndex : Smallint;

Description

ImageIndex determines an image from an image list, specified by the TdxFlowChart Images property.  Image layout within an object is determined by HorzImagePos and VertImagePos properties.  If ImageIndex is less than zero, the object has no associated image.


TdxFcObject.IsUnion

TdxFcObject         See Also

Determines whether an object includes a union.

property IsUnion : Boolean;

Description

Use IsUnion to determine whether an object is the main object of a union, i.e. it has child objects.  The object union includes one main object and other child objects.  When the main object is moved by the mouse or keys, all its child objects are moved synchronously with the main object; all "internal" connections, which link objects from one union, are moved as well.  Unions may be nested: Any child object can include its own union.  Unions may be created dynamically at runtime.  To change the IsUnion property value, use AddToUnion, RemoveFromUnion and ClearUnion methods.

ReadOnly Property


TdxFcObject.Left

TdxFcObject         See Also

Determines the left coordinate of an object within the flow chart.

property Left : Integer;

Description

Use Left to specify the horizontal position of an object.  This value should be set in pixels for the natural size of a chart (Zoom property is equal to 100).  Use RealLeft to determine the real position of an object within the flow chart.


TdxFcObject.LinkedObjectCount

TdxFcObject         See Also

Returns the total number of objects linked with a given object.

property LinkedObjectCount : Integer;

Description

Use LinkedObjectCount to determine the number of objects linked with a given object via  connections.  Use this property to iterate through the LinkedObjects property, for example:

// Delphi

for I:=0 to LinkedObjectCount-1 do

  LinkedObjects[I].Text := Self.Text + ' ' + IntToStr(I+1); { enumerate all linked objects sequentially }

// C++ Builder

for(int i=0;i<dxFlowChart1->LinkedObjectCount;i++) do

  dxFlowChart1->LinkedObjects[i]->Text = this.Text + ' ' + IntToStr(i+1); // enumerate all linked objects sequentially


TdxFcObject.LinkedObjects

TdxFcObject         See Also

Represents an array of objects linked with a given object.

property LinkedObjects[Index:Integer] : TdxFcObject;

Description

Use LinkedObjects to access objects linked with a given object by any connection.  Use this property to iterate throught all linked objects.  The LinkedObjects property automatically changes when creating and deleting objects and connections.


TdxFcObject.ObjectCount

TdxFcObject         See Also

Returns the total number of child objects for a given object.

property ObjectCount : Integer;

Description

Use ObjectCount to determine the number of child objects a given object unites.  This property includes only direct children of the given object; indirect children are not included.  ObjectCount and Objects properties are useful for operations with the entire union.  For nested unions, this procedure may be recursive, for example:

// Delphi

procedure MarkObject(AObject: TdxFcObject; AColor: TColor);

var

  I: Integer;

begin

  AObject.BkColor := AColor; // Mark the main object

  for I:=0 to AObject.ObjectCount-1 do  // If AObject is a union, mark

    MarkObject(AObject.Objects[I],AColor); // all its children on all levels

end;

// C++ Builder

void MarkObject(TdxFcObject * AObject, TColor AColor);

{

  AObject->BkColor = AColor; // Mark the main object

  for(int i=0;i<AObject->ObjectCount-1;i++)  // If AObject is a union, mark

    MarkObject(AObject->Objects[i], AColor); // all its children on all levels

};

ReadOnly Property


TdxFcObject.Objects

TdxFcObject         See Also

Represents an indexed array of objects united (grouped) with a given object as a main object.

property Objects[Index:Integer] : TdxFcObject;

Description

Use Objects to access child objects united (grouped) by a given object.  This array includes only direct children of the given object; indirect children are not included.  The Objects property is automatically changed when adding to a union and removing from it.


TdxFcObject.RealHeight

TdxFcObject         See Also

Represents the real height of an object in a zoomed flow chart.

property RealHeight : Integer;

Description

Determines the real height of an object in screen pixels based on zoom ratio.

ReadOnly Property


TdxFcObject.RealLeft

TdxFcObject         See Also

Specifies the left coordinate of an object in a zoomed flow chart.

property RealLeft : Integer;

Description

Determines the horizontal position of a given object in a flow chart based on zoom ratio.  Its value may not correspond to the object’s position in the window since a flow chart’s contents may be scrolled within it.  Position of an object within the flow chart window is equal to RealLeft - Owner.LeftEdge.

ReadOnly Property


TdxFcObject.RealSW

TdxFcObject         See Also

Determines the real width of lines for drawing an object's shape.

property RealSW : Word;

Description

TdxFcObject descendants use this property to determine the width of a line for drawing the shape frame of an object.  RealSW contains the real width of a line based on zoom ratio.  Set ShapeWidth to change this property.

Note: RealSW is unavailable if the object has no shape or if the rectangle object has a 3D border.

ReadOnly Property


TdxFcObject.RealTop

TdxFcObject         See Also

Determines the top coordinate of an object in a zoomed flow chart.

property RealTop : Integer;

Description

Determines the vertical position of a given object in a flow chart based on zoom ratio.  This value may not correspond to the position in the window because chart contents may be scrolled.  Use RealTop - Owner.TopEdge to determine position of an object within the window.

ReadOnly Property


TdxFcObject.RealWidth

TdxFcObject         See Also

Specifies the real width of an object in a zoomed flow chart.

property RealWidth : Integer;

Description

Determines the real width of an object in screen pixels based upon zoom ratio.


TdxFcObject.ShapeColor

TdxFcObject         See Also

Determines the shape color of an object.

property ShapeColor : TColor;

Description

Use ShapeColor to specify the color used for drawing the object shape.  ShapeColor can be changed using the palette of the flow chart editor or in the object customizing form.

Note: ShapeColor is ignored for objects with no shape and for rectanglular objects with a 3D border.


TdxFcObject.ShapeStyle

TdxFcObject

Determines the style in which object shape lines are drawn.

type

  TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame);

property ShapeStyle : TPenStyle;

Description

Determines the style of a shape’s lines.  It may be a solid line, a dashed line, a dotted line or any other standard TPen style.

Note: At this type, ShapeStyle has not been implemented.


TdxFcObject.ShapeType

TdxFcObject         See Also

Specifies object type.

type

  TdxFcShapeType = (fcsNone, fcsRectangle, fcsEllipse, fcsRoundRect, fcsDiamond, fcsNorthTriangle, fcsSouthTriangle, fcsEastTriangle, fcsWestTriangle, fcsHexagon, fcsUser);

property ShapeType : TdxFcShapeType;

Description

This property specifies object type.  Possible values include.

Value	Shape
fcsNone	No shape; only image and text are drawn.
fcsRectangle	Object looks like a rectangle.
fcsEllipse	Object looks like an ellipse.
fcsRoundRect	Object looks like a rectangle with rounded corners.
fcsDiamond	Object has a rhomb shape.
fcsNorthTriangle, fcsSouthTriangle, fcsEastTriangle, fcsWestTriangle	Object looks like a triangle.
fcsHexagon	Object has a hexagon shape.
fcsUser	User-defined shape (for descendant classes only).


TdxFcObject.ShapeWidth

TdxFcObject

Determines border width.

property ShapeWidth : Byte;

Description

This property specifies the width of an object’s border in pixels.


TdxFcObject.Tag

TdxFcObject         See Also

Represents a user-defined integer value associated with a given object.

property Tag : Integer;

Description

Use Tag to associate a number with an object.  This property is not used by component methods but it is stored with the object.  An application uses Tag for its own specific requirements.


TdxFcObject.Top

TdxFcObject         See Also

Determines the top coordinate of an object within a flow chart.

property Top : Integer;

Description

Use the Top property to specify the vertical position of an object.  This value is set in screen pixels for the natural size of a chart (the Zoom property is equal to 100).  Use the RealTop property to determine the real position of an object within a flow chart’s window.


TdxFcObject.Transparent

TdxFcObject         See Also

Specifies whether an object is drawn transparently.

property Transparent : Boolean;

Description

If Transparent is True, an object is drawn transparently, that is, it does not hide the screen behind it.  If the object has no shape, it is always transparent, regardless of the Transparent property value.


TdxFcObject.VertImagePos

TdxFcObject         See Also

Determines the vertical layout of an object’s image.

type

  TdxFcVertPos = (fcvpUp, fcvpCenter, fcvpDown);

property VertImagePos : TdxFcVertPos;

Description

Use HorzImagePos and VertImagePos to determine where an associated image is displayed in an object's client area.  The combination of HorzImagePos and VertImagePos provides nine possible positions.


TdxFcObject.VertTextPos

TdxFcObject         See Also

Represents the vertical position of object text.

type

  TdxFcVertPos = (fcvpUp, fcvpCenter, fcvpDown);

property VertTextPos : TdxFcVertPos;

Description

Use HorzTextPos and VertTextPos to determine where text is displayed in an object's client area.  The combination of HorzTextPos and VertImagePos provides nine possible positions.


TdxFcObject.Visible

TdxFcObject         See Also

Specifies whether an object is visible on screen.

property Visible : Boolean;

Description

Set Visible to False to make an object invisible.  Any invisible object is not displayed on screen and cannot be selected.  The Visible property can be set only at runtime, and it is not stored with the object.


TdxFcObject.Width

TdxFcObject         See Also

Determines object width.

property Width : Word;

Description

Use Width to get or set the width of an object.  This property should be specified in pixels for the natural size of a chart (the Zoom property is equal to 100).  Use RealWidth to determine real width.


TdxFcObject.ZOrder

TdxFcObject         See Also

ZOrder determines position of an object on Z-axis.

property ZOrder : Word;

Description

Use the ZOrder property to read or change object position in the Z-buffer.  When two objects have the same coordinates, an object with the higher ZOrder value overlaps the other.  Setting ZOrder to zero makes an object the lowest; setting ZOrder to the total number of objects makes it the highest.


TdxFcObject.AddToUnion

TdxFcObject         See Also

Adds AObject to the object union.

procedure AddToUnion(AObject: TdxFcObject);

Description

Use the AddToUnion method to make AObject the child of a calling object, i.e. to include AObject in the object union.  AObject is not added if it is already in a union.


TdxFcObject.BringToFront

TdxFcObject         See Also

Places an object in front of all other objects within a flow chart control.

procedure BringToFront;

Description

Use BringToFront to reorder overlapping objects.  BringToFront is useful for making a certain object visible.  It is also used to reorder overlapping objects within a flow chart’s window.  The order in which objects stack on top of each other (also called the Z order) depends on the order by which objects are placed onto the flow chart.


TdxFcObject.ClearUnion

TdxFcObject         See Also

Removes all objects from a union.

procedure ClearUnion;

Description

Use this method when a given object is the main object of a union.  Call ClearUnion in order to remove any united (grouped) objects from a union, where a given object is the main object.  This method clears the Objects array, since the Objects property specifies united objects.


TdxFcObject.Create

TdxFcObject         See Also

Creates an instance of type TdxFcObject.

constructor Create(AOwner: TdxCustomFlowChart);

Description

Creates and initializes an instance of TdxFcObject.  The direct call to Create is required only for the overridden TdxCustomFlowChart InternalCreateObject method.  In all other cases, use the CreateObject method.


TdxFcObject.Destroy

TdxFcObject

Destroys a TdxFcObject instance.

destructor Destroy;  override;

Description

The Destroy method destroys a given object and releases any memory it allocates.  First it removes the object from all Owner's lists and all object unions, then it calls inherited Destroy.  Do not call Destroy directly; instead use Free.


TdxFcObject.GetLinkedPoint

TdxFcObject         See Also

GetLinkedPoint returns a linked point nearest to a point with (X,Y) coordinates.

function GetLinkedPoint(X,Y: Integer): Integer;

Description

Use GetLinkedPoint to determine which linked point is nearest to a specified point.  Each object contains 16 linked points by which connections are linked.  Unlike selection points, which are always placed on the rectangle, linked points are placed on the object shape.  They are enumerated in following order:

X and Y are the coordinates of the flow chart client area.


TdxFcObject.GetSelPoint

TdxFcObject         See Also

Returns a number from 0 to 7, which is the number of a selection point nearest to a point with (X,Y) coordinates.

function GetSelPoint(X,Y: Integer): Integer;

Description

Use GetSelPoint to determine the selection point of a given object nearest to a specified point.  When an object is selected, it has eight selection points, which are placed on the rectangle and enumerated in the following order:

X and Y are the coordinates of the flow chart client area.


TdxFcObject.HasInUnion

TdxFcObject         See Also

Determines whether an object has AObject in its union.

function HasInUnion(AObject: TdxFcObject): Boolean;

Description

Use HasInUnion to determine whether AObject is the child object of a calling object.  HasInUnion returns True if the calling object has AObject in its union.  It also returns True if AObject is nil or equal to a given object (AObject = Self).


TdxFcObject.Load

TdxFcObject         See Also

Reads object properties from the stream.

procedure Load(Stream: TStream);  virtual;

Description

TdxFcObjects descendants can override Load to read additional properties.  When overriding, first call the inherited method and then read additional data.  Do not call Load directly; it is called automatically from the TdxCustomFlowChart LoadFromStream method.


TdxFcObject.MakeVisible

TdxFcObject         See Also

Makes an object visible within the flow chart window.

procedure MakeVisible;

Description

Use MakeVisible to ensure that a calling object is displayed on screen.  MakeVisible sets the Visible property to True and then, if necessary, scrolls the chart window to place an object onto the window area.


TdxFcObject.PaintImage

TdxFcObject         See Also

Draws an image associated with an object.

procedure PaintImage(R: TRect);

Description

PaintImage is called automatically from the default drawing procedure when an object is being drawn on screen.  It draws a bitmap, specified by ImageIndex.  The R parameter determines the rectangle, wherein to draw an image in object client area coordinates.  In the default drawing procedure, image position is determined by the HorzImagePos and VertImagePos properties.  Your program can call the PaintImage method directly from the OnDrawObject event handler (see the TdxCustomFlowChart OnDrawObject event).


TdxFcObject.PaintText

TdxFcObject         See Also

Draws object text.

procedure PaintText(R: TRect);

Description

PaintText is called automatically from the default drawing procedure when an object is drawn on screen.  It draws a text string, defined by the Text property.  Text is drawn within the R rectangle.  The R parameter determines the rectangle in object client area coordinates.  If PaintText is called from the default drawing procedure, text position is determined by HorzTextPos and VertTextPos properties.  Your application can call PaintText directly from the OnDrawObject event handler (see the TdxCustomFlowChart OnDrawObject event).


TdxFcObject.PutInFrontOf

TdxFcObject         See Also

Places a given object in front of another object.

procedure PutInFrontOf(Value: TdxFcObject);

Description

Use PutInFrontOf to reorder overlapping objects.  After calling PutInFrontOf, the calling object will overlap an object specified by Value.


TdxFcObject.RemoveFromUnion

TdxFcObject         See Also

Removes a specified object from a union.

procedure RemoveFromUnion(AObject: TdxFcObject);

Description

Use RemoveFromUnion to remove AObject from a union for which a given object is the main object.


TdxFcObject.Save

TdxFcObject         See Also

Writes object properties to a stream.

procedure Save(Stream: TStream);  virtual;

Description

TdxFcObjects descendants override Save in order to save additional properties to Stream.  When overriding be sure to call the inherited method first, then write additional data.  Do not call Save directly; it is called automatically from the TdxCustomFlowChart SaveToStream method.


TdxFcObject.SelectUnion

TdxFcObject         See Also

Selects all children of a calling object.

procedure SelectUnion;

Description

Use SelectUnion to select the entire union of a calling object.  SelectUnion selects all children at all levels; that is, it selects direct children of a given object, their children, etc.  The fcoCanSelect and fcoMultiSelect options must be set.  The following example demonstrates SelectUnion:

// Delphi

procedure TForm1.Button1Click(Sender : TObject)

begin

  if dxFlowChart1.SelectedObject <> nil then

    if dxFlowChart1.SelectedObject.ObjectCount > 0 then

      dxFlowChart1.SelectedObject.SelectUnion;

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

  if(dxFlowChart1->SelectedObject != NULL )

    if(dxFlowChart1->SelectedObject->ObjectCount > 0)

      dxFlowChart1->SelectedObject->SelectUnion();

};


TdxFcObject.SendToBack

TdxFcObject         See Also

Places a given object behind all other objects in Z-order.

procedure SendToBack;

Description

Use SendToBack to reorder overlapping objects.  After calling SendToBack, a given object will be overlapped by other objects.


TdxFcObject.SetBounds

TdxFcObject         See Also

Sets Left, Top, Width and Height properties of an object.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer);

Description

Use SetBounds to set all boundary properties of an object at a time.  It has the same effect as setting Left, Top, Width and Height properties separately, but is quicker.


TdxFcObject.UserLinkedPoints

TdxFcObject         See Also

Calculates linked points for a user-defined object.

procedure UserLinkedPoints; virtual; abstract;

Description

TdxFcObject introduces an abstract UserLinkedPoints method.  Descendants can override this method to perform special processing when changing object bounds or object shape and object’s ShapeType property is fcsUser.  If a descendant defines a new shape type, it has to override this method.  When entering UserLinkedPoints, all 16 linked points of an object are placed onto the shape rectangle according to the standard scheme for the rectangle object.

The overridden method should correct locations according to desired object shape.  For instance, the following procedure corrects linked points for a rectangle with a rounded right side.

// Delphi

procedure TMyObject.UserLinkedPoints;

var

  X0,Y0,A,B: Integer;

begin

  X0 := LinkedPoints[2].X; // Center of circle or

  Y0 := LinkedPoints[6].Y; // ellipse (general case)

  A := LinkedPoints[4].X - X0; // Horizontal ellipse radius

  B := LinkedPoints[4].Y - Y0; // Vertical ellipse radius

  LinkedPoints[3].X := X0 + A div 2;

  LinkedPoints[3].Y := Y0 - MulDiv(B,1732,2000); // B * u3 / 2

  LinkedPoints[4].X := X0 + MulDiv(A,1414,2000); // A * u2 / 2

  LinkedPoints[4].Y := Y0 - MulDiv(B,1414,2000); // B * u2 / 2

  LinkedPoints[5].X := X0 + MulDiv(A,1732,2000); // A * u3 / 2

  LinkedPoints[5].Y := Y0 - B div 2;

  for A := 7 to 9 do

  begin

    // Points 7 - 9 are symmetrical to points 3 - 5

    LinkedPoints[A].X := LinkedPoints[12-A].X;

    LinkedPoints[A].Y := Y0 + Y0 - LinkedPoints[12-A].Y;

  end;

end;

// C++ Builder

void __fastcall TMyObject.UserLinkedPoints(void)

{

 int X0,Y0,A,B;

  X0 = LinkedPoints[2]->X; // Center of circle or

  Y0 = LinkedPoints[6]->Y; // ellipse (general case)

  A = LinkedPoints[4]->X - X0; // Horizontal ellipse radius

  B = LinkedPoints[4]->Y - Y0; // Vertical ellipse radius

  LinkedPoints[3]->X = X0 + A/2;

  LinkedPoints[3]->Y = Y0 – B*1732/2000; // B * u3 / 2

  LinkedPoints[4]->X = X0 + A*1414/2000; // A * u2 / 2

  LinkedPoints[4]->Y = Y0 – B*1414/2000; // B * u2 / 2

  LinkedPoints[5]->X = X0 + A*1732/2000; // A * u3 / 2

  LinkedPoints[5]->Y = Y0 - B/2;

  for(int A = 7; A<= 9; A++)

  {

    // Points 7 - 9 are symmetrical to points 3 - 5

    LinkedPoints[A]->X = LinkedPoints[12-A]->X;

    LinkedPoints[A]->Y = Y0 + Y0 - LinkedPoints[12-A]->Y;

  };

};


TdxFcObject.UserRegion

TdxFcObject         See Also

Creates the drawing region for a user-defined object.

function UserRegion(R: TRect): HRgn;  virtual; abstract;

Description

The TdxFcObject class introduces an absract UserRegion method.  Descendants can override this method if an object needs to create a drawing region and its ShapeType property is fcsUser.  If a descendant defines a new shape type, it has to override this method.  The overridden UserRegion should create a region within the rectangle R, according to the desired object shape.  The overridden method should return a handle to this region.  For instance, the following function creates the region for a rectangle with a rounded right side.

// Delphi

function TMyObject.UserRegion(R: TRect): HRgn;

var

  W,H: Integer;

  R2: TRect;

  Rgn: HRgn;

begin

  W := R.Right - R.Left; // Rectangle width

  H := R.Bottom - R.Top; // Rectangle height

  if W > H then W := H; // If possible, create a circle line

  R2 := R;

  R2.Left := R2.Right - W; // Bounds for circle or ellipse

  Rgn := CreateEllipticRgnIndirect(R2);

  Dec(R.Right, W div 2); // Reduce rectangle size

  Result := CreateRectRgnIndirect(R);

  CombineRgn(Result,Result,Rgn,RGN_OR); // Rectangle + circle

  DeleteObject(Rgn); // No more needed

end;

// C++ Builder

HRGN __fastcall TMyObject.UserRegion(TRect * Rect)

{

  int W ,H;

  TRect * R2;

  HRGN Rgn;

  HRGN Rgn2;

  W = R->Right – R->Left; // Rectangle width

  H = R->Bottom – R->Top; // Rectangle height

  if (W > H) W = H; // If possible, create a circle line

  R2 = R;

  R2->Left = R2->Right - W; // Bounds for circle or ellipse

  Rgn2 = CreateEllipticRgnIndirect(R2);

  R->Right = R->Right - W/2; // Reduce rectangle size

  Rgn2 = CreateRectRgnIndirect(R);

  CombineRgn(Rgn2, Rgn2, Rgn, RGN_OR); // Rectangle + circle

  DeleteObject(Rgn); // No more needed

  return Rgn2;

};


TdxFlowChart

Hierarchy         Properties         Methods         Events

Represents a window for the display and editing of different linear, hierarchical, or network data structures.

Unit

dxflchrt

TdxFlowChart = class(TdxCustomFlowChart);

Description

A flow chart data structure includes any number of objects linked by any number of connections.  Separate groups of objects, called unions with hierarchical relations between members may be placed within a general structure.  Such structures have a wide range of applications from electrical schemes to business plans.  A flow chart control has many possibilities for creating and editing both the entire data structure and its separate items.


Hierarchy

TCustomControl

     |

TdxCustomFlowChart

     |


Properties for TdxFlowChart
TdxFlowChart Properties

TdxFlowChart          Legend

Derived from TdxCustomFlowChart

BorderStyle

ConnectionCount

Connections

Images

LeftEdge

ObjectCount

Objects

Options

RealZoom

SelectedConnection

SelectedConnectionCount

SelectedConnections

SelectedObject

SelectedObjectCount

SelectedObjects

TopEdge

Zoom


Methods for TdxFlowChart
TdxFlowChart Methods

TdxFlowChart          Legend

Derived from TdxCustomFlowChart

BeginUpdate

CanSelect

Changed

ChartPoint

Clear

ClearSelection

Create

CreateConnection

CreateObject

DefaultDrawObject

Delete

DeleteConnection

DeleteObject

DeleteSelection

Destroy

EndUpdate

GetConnectionAt

GetHitTestAt

GetObjectAt

InternalCreateConnection

InternalCreateObject

KeyDown

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SelCount

Select

SelectAll

SetLeftTop


Events for TdxFlowChart
TdxFlowChart Events

TdxFlowChart          Legend

Derived from TdxCustomFlowChart

OnChange

OnCreateItem

OnDeletion

OnDrawObject

OnSelected

OnSelection


Legend

Protected

Published

ReadOnly


TdxCustomFlowChart.Connections, TdxCustomFlowChart.ConnectionCount example

This example highlights all ‘hanged’ connections, that is, connections without a source or destination object.

// Delphi

procedure TForm1.SpeedButton2Click(Sender: TObject);

var

 i : Integer;

begin

  with dxFlowChart1 do

  begin

    for i := 0 to ConnectionCount-1 do

      if (Connections[i].ObjectSource = nil) or

         (Connections[i].ObjectDest = nil) then

        Connections[i].Color := clRed;

  end;

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

 for (int i=0;i<dxFlowChart1->ConnectionCount;i++)

  {

   if (dxFlowChart1->Connections[i]->ObjectSource == NULL ||

       dxFlowChart1->Connections[i]->ObjectDest == NULL)

        dxFlowChart1->Connections[i]->Color = clRed;

    }

};


TdxCustomFlowChart.CreateConnection, TdxCustomFlowChart.SelectedObjects, TdxCustomFlowChart.SelectedObjectCount, TdxConnection.Color, TdxConnection.Style Example

This example requires a form with TdxFlowChart and TSpeedButton.  The following code creates a new connection which links two selected objects.

procedure TForm1.SpeedButton1Click(Sender: TObject);

var

  NewConnection : TdxFcConnection;

begin

  with dxFlowChart1 do

  begin

    if SelectedObjectCount > 1 then

    begin

     NewConnection := CreateConnection(SelectedObjects[0], SelectedObjects[1], 0, 0);

     NewConnection.Color := clNavy;

     NewConnection.Style := fclstraight;

    end;

  end;

end;


TdxCustomFlowChart.SelectedConnection, TdxConnection.ArrowSource, TdxConnection.ArrowDest, TdxConnectionArrow.ArrowType Example

The following code changes edges of the selected connection:

// Delphi

procedure TForm1.Button1Click(Sender: TObject);

begin

  with dxFlowChart1.SelectedConnection do

  begin

    ArrowDest.ArrowType := fcaArrow;

    ArrowSource.ArrowType := fcaEllipse;

  end;

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

  if (dxFlowChart1->SelectedConnection != NULL)

  {

   dxFlowChart1->SelectedConnection->ArrowDest->ArrowType = fcaArrow;

   dxFlowChart1->SelectedConnection->ArrowSource->ArrowType = fcaEllipse;

  }

};


ShowFlowChartEditor

Displays the flow chart editor.

function ShowFlowChartEditor(AChart: TdxFlowChart; EditorCaption : String): Boolean;

Description

Use this function to display the flow chart editor at runtime.  This function shows an editor for the AChart flow chart.  EditorCaption specifies the caption of the editor form.  ShowFlowChartEditor returns True, if any chages have been made to the flow chart in the flow chart editor.  The result of ShowFloatChartEditor is used only at design time.  At runtime this function always returns False.  The following code is attached to the OnDblCliCk event handler that activates the flow chart editor:

// Delphi

procedure TForm1.dxFlowChart1DblClick(Sender: TObject);

begin

  ShowFlowChartEditor(dxFlowChart1, ‘FlowChart Editor’);

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

   ShowFlowChartEditor(dxFlowChart1,"FlowChart Editor");

}

Note: In order to use this function, you should

include ‘dxFcEdit’ in the uses section of a unit (for Delphi) or

‘ #Include "dxFcEdit.hpp"‘ ‘ in the header file (for C++ Builder).


TdxCustomFlowChart.SelectedConnections, TdxCustomFlowChart.SelectedConnectionCount, TdxCustomFlowChart.DeleteConnection example

This example demonstrates the deletion of several connections at a time.  The following procedure is the OnClick event handler of TSpeedButton:

// Delphi

procedure TForm1.SpeedButton1Click(Sender : TObject)

var

  i : integer;

begin

  for i := dxFlowChart1.SelectedConnectionCount-1 downto 0

   dxFlowChart1.DeleteConnection( dxFlowChart1.SelectedConnections[i]);

end;

// C++ Builder

void __fastcall TForm1::SpeedButton1Click(TObject *Sender)

{

  for(int i = dxFlowChart1->SelectedConnectionCount-1; i>=0; i--)

   dxFlowChart1->DeleteConnection( dxFlowChart1->SelectedConnections[i]);

};


Lines Unit Overview
Lines Unit

Routines

Distance

ExtendRect

LineCenter

LineLength

MassCenter

PtOnLine

QSpline

RectHLine

RectVLine

Types

TLineType


Distance

See Also

Calculates the distance between two points.

Unit

Lines

function Distance(const A,B: TPoint): Integer;

Description

Use this procedure to calculate the shortest distance between two points on screen.  The A and B parameters define coordinates of the first and second point respectively.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


ExtendRect

See Also

Enlarges the rectangle, specified by R.

Unit

Lines

procedure ExtendRect(var R: TRect; const P: TPoint);

Description

If a point, specified by P, is outside the rectangle, rectangle coordinates are changed to P coordinates.  The following figures illustrate this:

If a point is inside the rectangle, it is not enlarged.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


LineCenter

See Also

Returns a point that represents the center of a polyline.

Unit

Lines

function LineCenter(LType: TLineType; var Points; Count: Integer): TPoint;

Description

Use this function to get a point that represents the center of a polyline.  LType determines line type.  The Points parameter represents a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.  The following example demonstrates the LineCenter implementation:

var

  Pnts : array [0..3] of TPoint;

  Pnt : TPoint;

{ . . . }

implementation

{ . . . }

  Pnts[0].x := 10; Pnts[0].y := 10;

  Pnts[1].x := 20; Pnts[1].y := 10;

  Pnts[2].x := 20; Pnts[2].y := 20;

  Pnts[3].x := 10; Pnts[3].y := 20;

  // returns point (20, 15)

  Pnt := LineCenter(liStraight, Pnts ,4);

{ . . . }

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


LineLength

See Also

Calculates the length of a polyline.

Unit

Lines

function LineLength(LType: TLineType; var Points; Count: Integer): Integer;

Description

Use this function to get the length of a polyline.  LType determines line type.  The Points parameter is a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


MassCenter

See Also

Returns a point that represents the ‘mass’ center of a polyline.

Unit

Lines

function MassCenter(LType: TLineType; var Points; Count: Integer): TPoint;

Description

Use this function to calculate the ‘mass’ center of a polyline.  LType determines line type.  The Points parameter is a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.  The following code demonstrates a MassCenter implementation:

var

  Pnts : array [0..3] of TPoint;

  Pnt : TPoint;

{ . . . }

implementation

{ . . . }

  Pnts[0].x := 10; Pnts[0].y := 10;

  Pnts[1].x := 20; Pnts[1].y := 10;

  Pnts[2].x := 20; Pnts[2].y := 20;

  Pnts[3].x := 10; Pnts[3].y := 20;

// returns point (16, 15)

  Pnt := MassCenter(liStraight, Pnts ,4);

{ . . . }

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


PtOnLine

See Also

Determines whether a specified point belongs to a polyline.

Unit

Lines

function PtOnLine(LType: TLineType; var Points; Count,Delta,X,Y: Integer): Boolean;

Description

PtOnLine returns True if a point, specified by X and Y, belongs to a polyline.  LType determines polyline type.  The Points parameter is a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.  Delta determines the smallest distance within which a point, outside of the line, is still considered to belong to the line.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


QSpline

See Also

Draws a curved line that connects specified points.

Unit

Lines

procedure QSpline(DC: HDC; var Points; Count: Integer);

Description

This procedure connects specified points via a line of type liQSpline.  The Points parameter is a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


RectHLine

See Also

Connects points via horizontal and vertical lines.

Unit

Lines

procedure RectHLine(DC: HDC; var Points; Count: Integer);

Description

This function draws a line of type liRectH on screen to connect points.  The Points parameter is a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


RectVLine

See Also

Connects points via vertical and horizontal lines.

Unit

Lines

procedure RectVLine(DC: HDC; var Points; Count: Integer);

Description

Draws a line of type liRectV on screen to connect points.  The Points parameter is a pointer to an array that contains coordinates of vertices.  Count specifies the number of vertices in polyline.

Note: To use this function, you should include

‘Lines’ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp’ in the header file (for C++ Builder)


TLineType

See Also

Unit

Lines

TLineType = (liStraight, liQSpline, liRectH, liRectV);

Description

TLineType is used to determine the type of line that links two points.  The following values are available:

liStraight - A straight line between two points.

liQSpline - Points are connected by a curved line.

liRectH - Point are connected by horizontal and vertical lines (see the figure below).

liRectV - Points are connected by vertical and horizontal lines (see the figure below).


ExpressFlowChart - Getting Started

To fastest way to apply the ExpressFlowChart in your applications, is to review the projects which shipped with the installation set.  In this Getting Started section, we will offer step by step instruction to facilitate your learning process.

Tutorial

Object Features

Connection Features

Lines Procedures


ExpressFlowChart Tutorial Application
ExpressFlowChart Sample Application

The quickest way to introduce you to the ExpressFlowChart component is to create a chart application.  This tutorial guides you through the creation of a unique chart that allows an organization to illustrate document (electronic and paper) flow in the enterprise.

Step 1


Step 1
Tutorial Application - Step 1

Place an ExpressFlowChart component on a form.

Determine appearance characteristics of the ExpressFlowChart.  Use BorderStyle, Ctl3D, Color, ParentColor, etc to achieve a desired look and feel.

Place an ImageList on the same form and add images to it.  Next, associate this ImageList with the ExpressFlowChart on your form.  This step is necessary to draw images for ExpressFlowChart Objects.

Once you complete this step, your form should look similar to that pictured below:

Previous Step

Next Step


Step 2
Tutorial Application - Step 2

Now its time to create individual Objects within the ExpressFlowChart.

In order to perform this action at design time, you should use flow chart editor.  Double-click ExpressFlowChart control to activate the ExpressFlowChart editor.

Using the ExpressFlowChart editor, press the ‘Create Object’ button and drag the mouse pointer diagonally in a desired direction.

You can customize Object properties from the ExpressFlowChart editor toolbar or via the Object customizing form.   In order to activate the Object customizing form click the right mouse button on a selected Object and select ‘Properties‘ from popup menu.

With the General page of the Object customizing form, you can set Object text, font, width and height as well as the color of an Object’s border and background.

The Image page contains images from the ImageList, which we created in the first step.

The Frame page allows for customization of an Object’s border.  Occasionally, you may find that certain flags have no effect.  This is due to the fact that certain options disable other options.

In our sample chart let’s create an Object for every item in our document flow process: clerks, operators, directors, servers, etc.

Previous Step

Next Step


Step 3
Tutorial Application - Step 3

We have already created Objects within the ExpressFlowChart.  We can now link these Object to indicate information flow.  Objects within the ExpressFlowchart are linked via connections.  Connections within the chart can include unique colors, text, types, as well as source and destination arrow styles.

In order to create a connection, press the ‘Create connection’ button on the editor toolbar and drag the mouse pointer diagonally in a desired direction.

You can customize Connection properties in the same manner used to customize Object properties: from the ExpressFlowChart editor toolbar or via the connection customizing form.  In order to activate the connection customizing form, right click on a selected connection and select ‘Properties‘ from the popup menu.

Connection customizing form allows you to set connection properties including: Connection text, font, arrow style, line color and color of connection arrows.  Connections can have any number of intermediate points.  Use intermediate points when you wish to pass the connection through specific points.  To create intermediate points, click the connection and drag the new point to a desired position.

Previous Step

Next Step


Step 4
Tutorial Application - Step 4

Objects within the ExpressFlowChart can be united in a group.  Grouped Objects move together when one the main Object of a group moves.   This is known as a Union.

In order to group Objects, select several Objects, and use the ‘New union’ menu item from the main menu or popup menu of the ExpressFlowChart editor.  The Object selected first becomes the main Object of the union.

In our sample application, we can group members of the same department in one union.

Previous Step

Next Step


Step 5
Tutorial Application - Final Step

Our sample chart is ready (see figure below).

Use the zoom buttons to zoom the ExpressFlowChart’s view.  You can also fit the chart’s contents within the ExpressFlowChart window.

Write event handlers for the ExpressFlowChart to define ways in which a chart responds to user actions.

Use the Options property of the ExpressFlowChart to customize flow chart behavior at run time; You can easily allow end user to move Objects within the flow chart at run time or can allow deletion of such Objects.

Previous Step


ExpressFlowChart Connections Features
ExpressFlowChart Connection Features

Connection is the mechanism which links specific Objects in the ExpressFlowChart.  Chart connections include key features that help provide complex and colorful structures for the chart:

•	ExpressFlowChart allows Object linking via different connection lines: straight, curved, horizontal and vertical.

•	Each connection line can include any number of intermediate points, drawn according to these intermediate points.  Implementing intermediate points provides connection lines with complex shapes.

•	Each connection can include associated text, specific color, different source and destination edges.

•	Each connection can link Objects at specified link points.  If a connection is linked to an Object, it is automatically re-sized when the Object moves.  This unique connection feature automatically calculates a connection’s width or height each time a user moves a given Object.


ExpressFlowChart Objects Features

ExpressFlowChart Objects include a significant number of properties and methods to allow for massive chart customization and behavioral manipulation.

•	Objects can be placed anywhere within the ExpressFlowChart.  Objects are connected via connections.  Every Object can include its own border color and background color or can be transparent.

•	Every Object can include associated text and image.  Text is drawn using a specified font.  You can specify text and image layout within an Object’s area.

•	Objects within the ExpressFlowChart can include a number of unique shapes including: rectangle, ellipse, triangle, hexagon or diamond.

•	Objects within the ExpressFlowChart can be grouped into a union.  Grouped Objects move together when the main member of the group moves.  Once you double click the main Object, ExpressFlowChart selects all united Objects.  You can also change properties of several selected Objects.  To select several Objects, press and hold the Shift key as you select each individual Object.


Lines Procedures

ExpressFlowChart provides a small library of mathematical functions.  These functions are useful for calculating the center of a line, mass center of line, distance between two points, etc.  The Lines library also contains functions that draw different kind of lines.

Lines Library