Visible property (WinStudio scripts)

Applies To

IWSFormComponent interface

Definition

Sets or returns the value of the Hidden attribute for a specified component.

Get Syntax

object.Visible

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

Set Syntax

object.Visible = Boolean

  Part   Description
object Required. A reference to a form component object.
Boolean Required. Determines whether the attribute is enabled:
  • TRUE: Enable the Hidden attribute.
  • FALSE: Disable the Hidden attribute.

Remarks

In the Get Syntax, a return value of:

  • TRUE indicates that the Hidden attribute is enabled.
  • FALSE indicates that the Hidden attribute is disabled.

You cannot use this property for the first notebook tab component in a notebook.

Example

Sub Main()
   Dim bVisible As Boolean
   bVisible = ThisForm.Components("grid1").Visible
   Application.ShowMessage("Component is visible? " & bVisible)
   If bVisible Then
      ThisForm.Components("grid1").Visible = False
   Else
      ThisForm.Components("grid1").Visible = True
   End If
   Application.ShowMessage("Component is now visible? " _
      & ThisForm.Components("grid1").Visible.ToString())
End Sub
Related topics