Help / WLanguage / WLanguage functions / Controls, pages and windows / Diagram editor functions / Types of variables
  • Properties specific to diagConnectionPoint variables
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
diagConnectionPoint (Type of variable)
In french: diagPointDAttache
The diagConnectionPoint type is used to define all the advanced characteristics of a connection point (i.e. point around a shape that a connector snaps to) in a Diagram Editor control. The characteristics of this connection point can be defined and changed using different WLanguage properties.
Remark: 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 specific to diagConnectionPoint variables

The following properties can be used to handle a connection point:
Property nameType usedEffect
ShapediagShapeShape that contains the connection point.
XRealX-coordinate of the connection point, expressed in pixels.
XPercentRealX-coordinate of the connection point, expressed as a percentage.
YRealY-coordinate of the connection point, expressed in pixels.
YPercentRealY-coordinate of the connection point, expressed as a percentage.
  • Connectors can always snap to connection points created programmatically.
  • Multiple connectors can start from or end at a given connection point.
  • Shapes can have multiple connection points, accessible via the ConnectionPoint array of variables of type diagShape.
  • Both ends of a connector can have a connection point.
Minimum version required
  • Version 27
This page is also available for…
Click [Add] to post a comment

Last update: 05/23/2023

Send a report | Local help