Home > Code Library > SmartViewport > PageLeft

Last Update 24 May 2001

 


Search:



  

Options:

   

   

   

   



SmartViewport
Reference

PageLeft

Returns the left coordinate of the viewport virtual page. This property is not available at design time and is read-only at run-time.

Syntax

object.PageLeft

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 left-most control will determine the PageLeft 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 PageLeft property is always less or equal to cero.

Example:

'Add a CommandButton to SmartViewport1
'with properties [Left=135;Top=135;Index=0]


'Current PageLeft returns 0
Debug.Print "PageLeft = "; SmartViewport1.PageLeft

'Load a new instance of Command1
Load Command1(1)
Command1(1).Left = -1200
Command1(1).Visible =
True

'Refresh the viewport
SmartViewport1.Refresh

'Current PageLeft is now -1200
Debug
.Print "PageLeft = "; SmartViewport1.PageLeft

 
Copyright © 2001, Andrés Pons (andres@vbsmart.com). All rights reserved.