he Diagram page in the Code editor provides visual tools for setting up logical relationships among visual and nonvisual components organized in the Object TreeView. It is also a do
cumentation tool, since it illustrates these relationships schematically and lets you add comments to the diagram;
you can even print.
Components do
not appear on the Diagram page until you drag them from the Object TreeView. You can place multiple components and their children and properties on the Diagram page by dragging the component(s):
To arrange components vertically on the page, drag and drop them.
To arrange components horizontally on the page, press Shift while dragging.
If the components are already on the page, you can still rearrange them by dragging one or more of them.
The Diagram page shows five types of relationships, designated by a line, or connector: These lines are added automatically if the relationship is already established by the time you drag and drop the components;
if it isn抰, you can add one of the following connectors later:
Allude (arrow)
Property (line with solid arrow that points to object being referred to)
Master-detail (line with asymmetric "drum" glyphs at either end)
Lookup (line with "eye" glyph at end)
Parent (line with hollow arrow that points to the parent in the relationship)
You can also add Comment blocks to the Diagram page.
You can edit elements in a diagram by:
Widening components and bending lines and arrows by clicking in the middle and dragging.
Changing the color of the elements and lines, by right-clicking and choosing Color.
Moving, renaming, and deleting the labels next to property connectors.
To delete any component, connector, or comment block, select the item, right-click, and choose Remove. When you delete elements from the Diagram page, you are deleting them from the diagram only;
they can be restored by dragging them from the tree view back to the Diagram page. You can delete connector lines between elements representing all but parent-child relationships.
You can create and save multiple diagrams on the Diagram page. To create a new diagram, click the New diagram button;
a blank diagram page appears with the name UntitledX in the Name list box. You can rename the diagram by typing a new name in the Name list box. As you type, the name is saved in the list box above, where all the diagram names in the current unit are saved.
To delete a diagram page, select its name from the drop-down list box above Name on the toolbar and click the Delete diagram button.
Information about each module's Diagram page is stored in a file that ends with the .DDP extension. .DDP files have no effect on compilation. Delphi reads the .DTI format from previous Delphi versions.
Right-click any item on the Diagram page to access the following context menu commands.
To display a complete list of fields for a dataset object, right-click on the object and choose Show Field Info.