VLViewPort Reference

Method AdjustExtent

See AlsoSee Also Applies To Applies To

Automatically adjusts the virtual extent of the viewport. Typically this should be called when :

  • A contained control is moved
  • A new control is added on the viewport.
  • Viewport control is resize

If you set AutoAdjustExtent to true, then you will not never need to call this method.

 

Syntax

object.AdjustExtent()

 

The AdjustExtent method syntax has these parts:

Part Description
object An object expression that evaluates to an object of VLVPort type.

 

Remarks

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