|
SmartViewport
Reference
Returns the top coordinate of the viewport virtual page. This property is not
available at design time and is read-only at run-time.
Syntax
object.PageTop
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 top-most control will determine the PageTop value.
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. The PageTop
property is always less or equal than zero.
Example:
'Add a CommandButton to SmartViewport1
'with properties [Left=135;Top=135;Index=0]
'Current PageTop returns 0
Debug.Print
"PageTop = "; SmartViewport1.PageTop
'Load a new instance of Command1
Load Command1(1)
Command1(1).Top = -1200
Command1(1).Visible = True
'Refresh the viewport
SmartViewport1.Refresh
'Current PageTop is now -1200
Debug.Print
"PageTop = "; SmartViewport1.PageTop
|