ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Anchoring
  • Limits
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Anchor property sets the anchors of a control. It is possible to:
  • 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: Anchoring a control defines the control's behavior (dimensions and displacement) when the window (or state) changes size..
You can use multiple properties to set or get the anchor rate of a control. These properties are as follows:
Example
// Define the anchor characteristics
// The control will be resized vertically and horizontally
LIST_List1.Anchor = 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.
The anchorRight and anchorWidth constants can be combined with anchorBottom and anchorHeight.
<Control used>: Control name
Name of the control used (in a window or report).
WINDEVJava

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 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.
The anchorRight and anchorWidth constants can be combined with anchorBottom and anchorHeight.
Remarks

Anchoring

Reminder: anchoring a control allows you to define the control's behavior (dimensions and displacement) when changing the size of the window or state..
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.
WINDEVJava 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

WINDEVJava The Anchor property can be used in all the controls of a window.
WINDEV 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 Text 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

Last update: 12/05/2024

Send a report | Local help