ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Diagram Editor functions / Types of variables
  • Properties specific to diagConnector variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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.
Example
N is int

// Crée une forme rectangle
MaForme1 is diagRectangle
// Définit les dimensions, la position et la couleur de fond
MaForme1.X = 100
MaForme1.Y = 100
MaForme1.Width = 50
MaForme1.Height = 50
MaForme1.Background.Color = PastelRed

// Obtient une référence sur le diagramme affiché
MonDiagramme is Diagram <- EDIAG_MonDiagramme

// Ajoute la forme rectangle dans le diagramme
N = Add(MonDiagramme.Shape, MaForme1)

// Crée une forme ellipse
MaForme2 is diagOval

// Définit les dimensions, la position et la couleur de fond
MaForme2.X = 200
MaForme2.Y = 200
MaForme2.Width = 50
MaForme2.Height = 50
MaForme2.Background.Color = PastelGreen

// Ajoute la forme ellipse dans le diagramme
Add(MonDiagramme.Shape, MaForme2)

// Crée un lien
MonLien is diagConnector
Add(MonDiagramme.Shape, MonLien)

// Reprend une référence sur les objets ajoutés
MaForme1 <- MonDiagramme.Shape[ N ]
MaForme2 <- MonDiagramme.Shape[ N + 1 ]
MonLien  <- MonDiagramme.Shape[ N + 2 ]

MonLien.Beginning.ConnectionPoint = MaForme1.ConnectionPoint[1]
MonLien.Beginning.ConnectionPoint.X = 100
MonLien.Beginning.ConnectionPoint.Y = 50

MonLien.Ending.ConnectionPoint = MaForme2.ConnectionPoint[1]
MonLien.Ending.ConnectionPoint.X = 0
MonLien.Ending.ConnectionPoint.Y = 50
Properties

Properties specific to diagConnector variables

Note: The type diagConnector type inherits from the diagShape type, all the properties of the diagShape type are available for the diagConnector. These properties appear in italics in the list below.
The following properties can be used to handle a connector:
Property nameType usedEffect
ActionAlloweddiagActionAllowed 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 diagActionAll (Default value): all possible actions will be allowed on the shape.
AngleRealAngle of rotation of the shape (in degrees).
ArrivaldiagHeadTarget end of the connector.
BackgroundConstant, integer or ColorBackground 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.
BorderdiagBorderCharacteristics of the shape border.
The available properties are:
  • Color: border color.
  • Thickness: edge thickness.
  • Type: type of border.
CommentCharacter stringNote about the shape. This note is not displayed.
ConnectionPointArray of diagConnectionPointList of connection points of the shape.
New in version 2025
Extra
VariantAllows 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()
HeightRealHeight of the box that contains the shape before rotation or zoom, expressed in pixels.
NameCharacter stringShape name. This name will be used for searching, for example, if the shape is in a library.
NoteCharacter stringNote associated with the shape.
OpacityIntegerPercentage of opacity of the shape. This value ranges from invisible (0) to completely opaque (100).
RoutingInteger constantType of route taken by the connector:
  • routeDirect The link 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 the start and end points, passing through the waypoints.
ShadowBoolean
  • True if the shape has a shadow,
  • False otherwise.
StartdiagHeadSource end of the connector.
TextdiagTextText (with formatting) inside the shape.
WayPointArray of diagWaypointConnector waypoints.
WidthRealWidth of the box that contains the shape before rotation or zoom, expressed in pixels.
XReal 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.
YReal 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:
The Diagram control Unit examples (WINDEV): The Diagram control
[ + ] Simplified use of a Diagram control
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help