PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Anchor
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The Anchor property is used to manage the anchors of a control. You can:
  • Identify the anchors currently set on a control in a window or report.
  • Modify the characteristics of the anchors set on a control in a window.
Reminder: The anchors of a control define the control behavior (size and location) when the window (or report) is resized.
Several properties are used to define or find out the anchor rate of a control. These properties are as follows:
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 16 and later
WINDEVLinux This property is now available for WINDEV applications in Linux.
New in version 16
WINDEVLinux This property is now available for WINDEV applications in Linux.
WINDEVLinux This property is now available for WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
Universal Windows 10 App This property is now available in Windows Store apps mode.
Versions 19 and later
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileiPhone/iPad This property is now available for report controls.
WEBDEV - Server code This property is available for report controls only.
New in version 19
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileiPhone/iPad This property is now available for report controls.
WEBDEV - Server code This property is available for report controls only.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileiPhone/iPad This property is now available for report controls.
WEBDEV - Server code This property is available for report controls only.
Versions 20 and later
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// Define the anchor characteristics
// The control will be resized vertically and horizontally
LIST_List1.Anchor = anchorWidth + anchorHeight
Syntax

Finding out the anchor of a control Hide the details

<Current anchor> = <Control used>.Anchor
<Current anchor>: Integer constant
Characteristics of anchor currently set on the control.
anchorBottomThe control moves to the bottom.
anchorRightThe control moves to the right.
anchorHeightThe control stretches to the bottom.
anchorTopLeftNo action.
anchorWidthThe control stretches to the right.

anchorRight and anchorWidth can be associated with anchorBottom and anchorHeight.
<Control used>: Control name
Name of control used (window or report control).
WINDEVUniversal Windows 10 AppWindows MobileiPhone/iPadJava

Modifying the anchors set on a control Hide the details

<Control used>.Anchor = <New anchor>
<Control used>: Control name
Name of control used (window or report control).
<New anchor>: Integer constant
Characteristics of anchor currently set on the control.
anchorBottomThe control moves to the bottom.
anchorRightThe control moves to the right.
anchorHeightThe control stretches to the bottom.
anchorTopLeftNo action.
anchorWidthThe control stretches to the right.

anchorRight and anchorWidth can be associated with anchorBottom and anchorHeight.
Remarks

Anchor

Reminder: the anchor of a control is used to define the control behavior (size and location) when resizing the window or report.
The positions and widths used to calculate the new sizes and positions are the ones defined in the editor. They can be returned by the XInitial, YInitial, InitialWidth and InitialHeight properties.
WINDEVUniversal Windows 10 AppWindows MobileAndroidiPhone/iPadJava Remarks:
  • The Anchor property is not available for columns in Table or TreeView Table controls. The anchors of a column can be specified directly with the AnchorRateWidth property.
  • If the control is associated with a tab pane, the anchor is defined in relation to the Tab control.

Limits

WINDEVUniversal Windows 10 AppWindows MobileAndroidiPhone/iPadJava The Anchor property applies to all the controls in a window.
Versions 19 and later
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppWindows MobileiPhone/iPad The Anchor property applies to all the controls in a report. In this case, you can only find out the type of anchors used.
New in version 19
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppWindows MobileiPhone/iPad The Anchor property applies to all the controls in a report. In this case, you can only find out the type of anchors used.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppWindows MobileiPhone/iPad The Anchor property applies to all the controls in a report. In this case, you can only find out the type of anchors used.
Java The Anchor property applies only to the following controls:
  • Button control.
  • Static control.
  • Edit control.
  • Image control.
  • Check Box control.
  • Radio Button control.
  • List Box control.
  • Combo Box control.
  • TreeView control.
  • Tab control.
  • Table control.
  • Supercontrol.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment