Test for field visible

Command group Flag affected Reversible Execute on client Platform(s)
Fields YES NO NO All


Test for field visible {field-name}


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.


Test for field visible {myField}
If flag true
  Hide fields {myField}
  Show fields {myField}
End If
; or do it like this
If $cwind.$objs.myField.$visible
  Do $cwind.$objs.myField.$visible.$assign(kFalse)
  Do $cwind.$objs.myField.$visible.$assign(kTrue)
End If