4D v14.3

OBJECT SET ENTERABLE

Home

 
4D v14.3
OBJECT SET ENTERABLE

OBJECT SET ENTERABLE 


 

OBJECT SET ENTERABLE ( {* ;} object ; enterable ) 
Parameter Type   Description
Operator in If specified, Object is an Object Name (String) If omitted, Object is a Field or a Variable
object  Form object in Object Name (if * is specified), or Table or Field or Variable (if * is omitted)
enterable  Boolean in True for enterable; False for non-enterable

The OBJECT SET ENTERABLE command makes the form objects specified by object either enterable or non-enterable.

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

Using this command is equivalent to selecting Enterable for a field or variable in the Form Editor’s Property List window. This command works in subforms only if it is in the form method of the subform.

When the entryArea is enterable (TRUE), the user can move the cursor into the area and enter data. When the entryArea is non-enterable (FALSE), the user cannot move the cursor into the area and cannot enter data.

The OBJECT SET ENTERABLE command can also be used to enable the “Enter in List” mode by programming for subforms and list forms displayed using the MODIFY SELECTION and DISPLAY SELECTION commands:

  • For subforms, in the entryArea parameter, pass either the name of the subform table or the name of the subform object itself, for example: OBJECT SET ENTERABLE(*;"Subform";True).
  • For list forms, you must pass the name of the form table in the entryArea parameter, for example: OBJECT SET ENTERABLE([MyTable];True).

Making an object non-enterable does not prevent you from changing its value programmatically.

The following example sets a shipping field, depending on the weight of the shipment. If the shipment is 1 ounce or less, then the shipper is set to US Mail and the field is set to be non-enterable. Otherwise, the field is set to be enterable.

 If([Shipments]Weight<=1)
    [Shipments]Shipper:="US Mail"
    OBJECT SET ENTERABLE([Shipments]Shipper;False)
 Else
    OBJECT SET ENTERABLE([Shipments]Shipper;True)
 End if

Here is the object method of a checkbox located in the header of a list in order to control the Enter in List mode:

 C_BOOLEAN(bEnterable)
 OBJECT SET ENTERABLE([Table1];bEnterable)

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 238

 
HISTORY 

Modified: 4D 2004
Renamed: 4D v12

 
SEE ALSO 

DISABLE BUTTON
ENABLE BUTTON
OBJECT Get enterable
OBJECT SET VISIBLE

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : SET ENTERABLE ( 4D v11 SQL Release 6)