Top property (WinStudio scripts)

Applies To

  • IWSForm interface
  • IWSFormComponent interface

Definition

Form objects: Sets or returns the measure in character units from the top of a form to the top of the WinStudio workspace. Read/write.

Component objects: Returns the measure in character units from the top of a component to the top of a form. Read-only.

Get Syntax

object.Top

  Part   Description
object Required. A reference to a form or component object.

Set Syntax

object.Top = double

  Part   Description
object Required. A reference to a form or component object.
double Required. Form objects only. An expression that evaluates to a Double and sets the distance in character units from the top edge of the form to the top edge of the WinStudio workspace.

Remarks

The return value is a Double that indicates the distance in character units from:

  • (For forms) The top side of the workspace to the top edge of the form.
  • (For components) The top side of the form to the top edge of the component.

Examples

Form example:

Sub Main()
    Application.ShowMessage("The top side of this form is currently " & _
       ThisForm.Top & " units from the top.")
    ThisForm.Top = 20
    Application.ShowMessage("The top side of this form has been moved to " & _
       ThisForm.Top & " units from the top.")
End Sub

Component example:

Sub Main()
   Application.ShowMessage("The secondary collection grid is " _
      & ThisForm.Components("grid1").Top & _
      " character units from the top of the form.")
End Sub
Related topics