VLViewPort Reference

Read/Write Property AutoAdjustExtent

See AlsoSee Also Applies To Applies To

Returns or sets the value that controls automatic adjustment of viewport extent.

 

Syntax

object.AutoAdjustExtent [= boolean]

 

The AutoAdjustExtent property syntax has these parts:

Part Description
Object An object expression that evaluates to VLVPort
Boolean A Boolean expression that specifies if the control should automatically adjust the viewport extent when new controls are added to it, and existing controls are moved or resized.

Setting

The settings for boolean are:

Setting Description
True (default) Enables automatic adjustment of viewport extent.
False Disables automatic adjustment of viewport extent.

 

Remark

When AutoAdjustExtent is set to true, the control will automatically adjust the viewport extent as the new controls are added and contained controls are moved or resized. VirtualWidth and VirtualHeight properties will reflect the new values of the viewport extent.

Any assignment to VirtualWidth and VirtualHeight will be ignored when the AutoAdjustExtent is set to True.

The virtual width is calculated by the following logic :

   For Each ContainedControl 
      If (Control.Right > MaxRight) then
         MaxRight = Control.Right
      End If
   Next 

   VirtualWidth = MaxRight + RightMargin

 

The virtual height is calculated by the following logic :


   For Each ContainedControl 
      If (Control.Bottom > MaxBottom) then
         MaxBottom = Control.Bottom
      End If 
   Next 

   VirtualHeight = MaxBottom + BottomMargin