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 / Control functions
  • Defining an attach point
  • Position of the attach point
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Defines an attach point for one of the two extremities of a Wire control.
Example
IdPointAttacheDépart is int
IdPointAttacheArrivée is int

FIL_Fil_de_liaison is Control

FIL_Fil_de_liaison <- ControlCreate("Liaison", typWire)


FIL_Fil_de_liaison.ChampDépart = IMG_Depart
FIL_Fil_de_liaison.ChampArrivée = IMG_Arrivee

IdPointAttacheDépart = AttachPointAdd(IMG_Depart, 100, 25)
IdPointAttacheArrivée = AttachPointAdd(IMG_Arrivee, 0, 75)

FIL_Fil_de_liaison.PointDAttacheDépart = IdPointAttacheDépart
FIL_Fil_de_liaison.PointDAttacheArrivée = IdPointAttacheArrivée
Syntax

Defining an attach point via its coordinates Hide the details

<Result> = AttachPointAdd(<Control used> , <X> , <Y>)
<Result>: Integer
Identifier of the attach point. This identifier can be used with the AttachPointStart and AttachPointEnd properties.
<Control used>: Control name
Name of the start or end control of the Wire control.
<X>: Integer
Horizontal position of attach point in % (see the Notes). The value of this parameter must be included between 1 and 100.
<Y>: Integer
Vertical position of attach point in % (see the Notes). The value of this parameter must be included between 1 and 100.

Defining an attach point via a Point variable Hide the details

<Result> = AttachPointAdd(<Control used> , <Point>)
<Result>: Integer
Identifier of the attach point. This identifier can be used with the AttachPointStart and AttachPointEnd properties.
<Control used>: Control name
Name of the start or end control of the Wire control.
<Point>: Point variable
Name of the Point variable corresponding to the attach point. The coordinates of the point are expressed in % (see the Notes).
Remarks

Defining an attach point

To define an attach point, you must know:
  • The control linked to the attach point. This control corresponds to the start or end point of Wire control.
  • The position of the attach point on one of the control sides.
The attach point can correspond to the start or end point of the Wire control.

Position of the attach point

The position of the attach point is defined by 2 values representing in percentage the X and Y position (horizontal and vertical) in relation to the control.
For example:
  • if <X> is set to 0, the attach point starts from the left side of the control.
  • if <X> is set to 100, the attach point starts from the right side of the control.
  • if <Y> is set to 0, the attach point starts from the top side of the control.
  • if <Y> is set to 100, the attach point starts from the bottom side of the control.
Another example: To start the Wire control from the attachment point at the bottom center of the field:
  • <X> must be equal to 50,
  • <Y> must be equal to 100.
Component: wd300obj.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help