In order to use FlowChartX drag and drop methods, your application has to initialize the OLE libraries first. That is done by calling the OleInitialize API function, as shown below.
Delphi Copy Code |
---|
procedure TForm1.FormShow(Sender: TObject); |
In order to use FlowChartX properties of type Font, Picture, Color or SAFEARRAY, you must include reference to the unit ActiveX in the uses clause.
To convert from Delphi native TFont type to the ActiveX font type, use this procedure:
Delphi Copy Code |
---|
procedure GetOleFont(Font: TFont; var OleFont: IFontDisp); |
To change the font of the active box' text you might use code like this:
Delphi Copy Code |
---|
var |
To convert from Delphi native TPicture type to ActiveX picture type, use this procedure:
Delphi Copy Code |
---|
procedure GetOlePicture(Picture: TPicture; var OlePicture: IPictureDisp); |
To display an image in the active box use code like this:
Delphi Copy Code |
---|
var |
The procedure below shows how to change the active box' fill color.
Delphi Copy Code |
---|
var |
Arguments to the automatic layout algorithms are passed to the ArrangeDiagram method via instances of TreeLayout, LayeredLayout or SpringLayout structures. Those can be created like this:
Delphi Copy Code |
---|
procedure TForm1.layoutTree(dir: ETreeLayoutDirection); |