PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
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
The Anchor property sets the anchors of a control. You can:
  • Identify the anchors currently set on a control in a window or report.
  • Change 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.
You can use multiple properties to set or get the anchor rate of a control. These properties are as follows:
WEBDEV - Server code This property is available for report controls only.
Example
// Définition des caractéristiques d'ancrage
// Le champ sera agrandi en hauteur et largeur
LISTE_Liste1.Ancrage = anchorWidth + anchorHeight
Syntax

Getting the control anchors Hide the details

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

anchorRight and anchorWidth can be associated with anchorBottom and anchorHeight.
<Control used>: Control name
Name of the control used (in a window or report).
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetMac CatalystJava

Changing the control anchors Hide the details

<Control used>.Anchor = <New anchor>
<Control used>: Control name
Name of the control used (in a window or report).
<New anchor>: Integer constant
New anchoring characteristic defined for the control:
anchorBottomThe control moves to the bottom.
anchorHeightThe control stretches to the bottom.
anchorRightThe control moves to the right.
anchorTopLeftNo action.
anchorWidthThe control stretches to the right.

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

Anchoring

Reminder: use anchors to set the control's size and position when the window or report is resized.
The new position and size are calculated based on the ones defined in the editor. They can also be returned by the XInitial, YInitial, InitialWidth and InitialHeight properties.
WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetMac CatalystJava 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 placed in a tab pane, the anchor is defined within the Tab control.

Limits

WINDEVUniversal Windows 10 AppAndroidiPhone/iPadIOS WidgetMac CatalystJava The Anchor property can be used in all the controls of a window.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPadIOS Widget The Anchor property can be used in all the controls of a report. In this case, you can only get the type of anchors used.
Java The Anchor property can only be used in 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