ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Defining an attach point
  • Position of the attach point
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Defines an attach point for one of the two extremities of a Wire control.
Example
StartAttachPointID is int
EndAttachPointID is int
 
WIRE_Link_wire is Control
 
WIRE_Link_wire <- ControlCreate("Link", typWire)
 
 
WIRE_Link_wire.StartControl = IMG_Start
WIRE_Link_wire.EndControl = IMG_End
 
StartAttachPointID = AttachPointAdd(IMG_Start, 100, 25))
EndAttachPointID = AttachPointAdd(IMG_End, 0, 75))
 
WIRE_Link_wire.AttachPointStart = StartAttachPointID
WIRE_Link_wire.AttachPointEnd = EndAttachPointID
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 attach point found at the bottom and in the middle of the control:
  • <X> must be equal to 50,
  • <Y> must be equal to 100.
Component: wd290obj.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/05/2024

Send a report | Local help