|
|
|
|
|
- Properties specific to diagConnector variables
diagConnector (Variable type) In french: diagLien
Warning
From version 27 (77), diagLink is kept for backward compatibility. This function has been replaced with diagConnector.
The diagConnector type is used to define all the advanced characteristics of a connector in a diagram. You can define and change the characteristics of this connector using different WLanguage properties. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. N is int // Create a rectangle shape MyShape1 is diagRectangle // Set the dimensions, position and background color MyShape1.X = 100 MyShape1.Y = 100 MyShape1.Width = 50 MyShape1.Height = 50 MyShape1.Background.Color = PastelRed // Reference the displayed diagram MyDiagram is Diagram <- DIAGEDT_MyDiagram // Add the rectangle shape to the diagram N = Add(MyDiagram.Shape, MyShape1) // Create an ellipse MyShape2 is diagOval // Set the dimensions, position and background color MyShape2.X = 200 MyShape2.Y = 200 MyShape2.Width = 50 MyShape2.Height = 50 MyShape2.Background.Color = PastelGreen // Add the ellipse to the diagram Add(MyDiagram.Shape, MyShape2) // Creates a connector MyConnector is diagConnector Add(MyDiagram.Shape, MyConnector) // Reference added objects MyShape1 <- MyDiagram.Shape[ N ] MyShape2 <- MyDiagram.Shape[ N + 1 ] MyConnector <- MyDiagram.Shape[ N + 2 ] MyConnector.Beginning.ConnectionPoint = MyShape1.ConnectionPoint[1] MyConnector.Beginning.ConnectionPoint.X = 100 MyConnector.Beginning.ConnectionPoint.Y = 50 MyConnector.Ending.ConnectionPoint = MyShape2.ConnectionPoint[1] MyConnector.Ending.ConnectionPoint.X = 0 MyConnector.Ending.ConnectionPoint.Y = 50 Properties Properties specific to diagConnector variables Remark: The diagConnector type inherits from the diagShape type. This means all the properties of the diagShape type are available for the diagConnector type. These properties appear in italics in the list below. The following properties can be used to handle a connector: | | | Property name | Type used | Effect |
---|
ActionAllowed | diagActionAllowed or constant | - diagActionAllowed variable used to define the changes the user can make to the shape.
- constant diagActionNo: no action will be allowed on the form.
- Constant diagActionToute (default value): all possible actions will be allowed on the shape.
| Angle | Real | Angle of rotation of the shape (in degrees). | Arrival | diagHead | Target end of the connector. | Background | Constant, integer or Color | Background color of the shape. The Color property is used to define the background color of the shape. This property can correspond to: - an RGB color (returned by RGB),
- an HSL color (returned by HSL),
- a WLanguage preset color.
- a variable of type Color. In this case, the opacity specified in the variable is taken into account.
| Border | diagBorder | Characteristics of the shape border. The available properties are: - Color: border color.
- Thickness: edge thickness.
- Type: type of border.
| Comment | Character string | Note about the shape. This note is not displayed. | ConnectionPoint | Array of diagConnectionPoint | List of connection points of the shape. | New in version 2025Extra | Variant | Allows you to store advanced information without affecting the execution of the application. You can store values of any type (array, etc.). It is also possible to add members to the Extra property. Example:
MyVariable.Extra.Info1 = Value MyVariable.Extra[Info2] = Value2 MyVariable.Extra.Date = DateSys() | Height | Real | Height of the box that contains the shape before rotation or zoom, expressed in pixels. | Name | Character string | Shape name. This name will be used for searching, for example, if the shape is in a library. | Note | Character string | Note associated with the shape. | Opacity | Integer | Percentage of opacity of the shape. This value ranges from invisible (0) to completely opaque (100). | Routing | Integer constant | Type of route taken by the connector: - routeDirect: The link route is a straight line from the start point to the end point, via the waypoints..
- routeOrthogonal: The link route can make right-angle changes of direction between start and end points, passing through waypoints..
| Shadow | Boolean | - True if the shape has a shadow,
- False otherwise.
| Start | diagHead | Source end of the connector. | Text | diagText | Text (with formatting) inside the shape. | WayPoint | Array of diagWaypoint | Connector waypoints. | Width | Real | Width of the box that contains the shape before rotation or zoom, expressed in pixels. | X | Real | X-coordinate of the box that contains the shape before rotation or zoom, expressed in pixels. This X-coordinate is relative to the parent of the shape. | Y | Real | Y-coordinate of the box that contains the shape before rotation or zoom, expressed in pixels. This Y-coordinate is relative to the parent of the shape. |
Related Examples:
|
Unit examples (WINDEV): The Diagram control
[ + ] Simplified use of a Diagram control
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|