Test for field visible

Command groupFlag affectedReversibleExecute on clientPlatform(s)
FieldsYESNONOAll

Syntax

Test for field visible
 
field-name

Description

This command tests whether a particular field is visible. If the specified field in the top window instance is visible, that is, $visible is kTrue and the field has not been hidden with Hide fields, the flag is set. A field under another field or beyond the edge of the screen, may be reported as visible and the flag set. The flag is always cleared if there are no window instances open or if the field does not exist.

Example

Test for field visible
 
myField

If flag true
  
Hide fields
 
myField

Else
  
Show fields
 
myField

End If
 
# or do it like this

If
 
$cwind.$objs
.
myField
.
$visible

  
Do
 
$cwind.$objs
.
myField
.
$visible.$assign
(
kFalse
)

Else
  
Do
 
$cwind.$objs
.
myField
.
$visible.$assign
(
kTrue
)

End If