|
SmartViewport
Reference
Returns the height of the viewport virtual page. This property is not available
at design time and is read-only at run-time.
Syntax
object.PageHeight
The object placeholder represents an object expression that evaluates to a SmartViewport
object.
Remarks
This property is only available at run-time. The viewport internally mantains
a virtual page which size and position are based on the layout of its visible
contained controls. The PageHeight value corresponds to the distance
between the top-most and bottom-most contained controls. If you add controls
dynamically at run-time you should use the method Refresh
to force the viewport to re-calculate its vitual page bounds.
Example:
'Add a CommandButton to SmartViewport1
'with properties [Left=135;Top=135;Height=495;Width=1455;Index=0]
'Current PageHeight returns 630 (=135+495)
Debug.Print
"PageHeight = "; SmartViewport1.PageHeight
'Load a new instance of Command1
Load Command1(1)
Command1(1).Top = 2400
Command1(1).Visible = True
'Refresh the viewport
SmartViewport1.Refresh
'Current PageHeight is now 2895 (=2400+495)
Debug.Print
"PageHeight = "; SmartViewport1.PageHeight
|