Click or drag to resize

Control.OwnerAlignment Property

X#
Constant representing how the window will be aligned within its owner window.

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 VIRTUAL PROPERTY OwnerAlignment AS USUAL SET 
Request Example View Source

Property Value

Type: Usual
Constant representing how the window will be aligned within its owner window.
Remarks

If a value has been set for this property, any resizing of the owner

window will cause the window to be automatically realigned, resized, and/or moved accordingly.

Note:By default (or by setting OwnerAlignment to Auto in the Window Editor), a control will appear where it was placed by the programmer and will not be realigned, resized, and/or moved when its owner window is resized.

There are two assigns that aid owner alignment:

  • Control:OwnerAlignment for controls
  • Window:OwnerAlignment for windows

Whenever one of these assigns is called, the current size and position of the control or window is saved to an internal array. The assign can be called as often as is required without any difficulty and it will simply over right the old values.

Starting with build 2824 this property can take two different forms:

  • proportional mode
  • linear mode

Proportional OwnerAlignment

With proportional mode you use the OA_ defines to specify how the position and size of the controls should change when the size of the window changes. For example:

With linear mode you do not use predefines OA_ defines but you specify the amount of change for each of the 4 properties of a control in code:

  • The X position
  • The Y position
  • The Width
  • The Height
See Also