SET VISIBLE

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 6.0


SET VISIBLE ({*; }object; visible)

ParameterTypeDescription
*If specified, Object is an Object Name (String)
If omitted, Object parameter is a Field or a Variable
objectForm ObjectObject Name (if * is specified), or
Field or Variable (if * is omitted)
visibleBooleanTrue for visible, False for invisible

Description

The SET VISIBLE command shows or hides the objects specified by object.

If you specify the optional * parameter, you indicate an object name (a string) in object. If you omit the optional * parameter, you indicate a field or a variable in object. In this case, you specify a field or variable reference (field or variable objects only) instead of a string. For more information about object names, see the section Object Properties.

If you pass visible equal to TRUE, the objects are shown. If you pass visible equal to FALSE, the objects are hidden.

Example

Here is a typical form in the Design environment:

The objects in the Employer Information group box each have an object name that contains the expression "employer" (including the group box). When the Currently Employed check box is checked, the objects must be visible; when the check box is unchecked, the objects must be invisible. Here is the object method of the check box:

     ` cbCurrentlyEmployed Check Box Object Method
   Case of 
      : (Form event=On Load)
         cbCurrentlyEmployed:=1
    
      : (Form event=On Clicked)
            ` Hide or Show all the objects whose name contains "emp"
         SET VISIBLE(*;"@emp@";cbCurrentlyEmployed # 0)
            ` But always keep the check box itself visible
         SET VISIBLE(cbCurrentlyEmployed;True)
   End case 

Therefore, when executed, the form looks like:

or:

See Also

DISABLE BUTTON, ENABLE BUTTON, SET ENTERABLE.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next