Skip to main content
Version: 20 R5

Action


Draggable

Control whether and how the user can drag the object. By default, no drag operation is allowed.

Two drag modes are available:

  • Custom: In this mode, any drag operation performed on the object triggers the On Begin Drag form event in the context of the object. You then manage the drag action using a method.
    In custom mode, basically the whole drag-and-drop operation is handled by the programmer. This mode lets you implement any interface based upon drag-on-drop, including interfaces that do not necessarily transport data, but can perform any action like opening files or triggering a calculation. This mode is based upon a combination of specific properties, events, and commands from the Pasteboard theme.
  • Automatic: In this mode, 4D copies text or pictures directly from the form object. It can then be used in the same 4D area, between two 4D areas, or between 4D and another application. For example, automatic drag (and drop) lets you copy a value between two fields without using programming:

    In this mode, the On Begin Drag form event is NOT generated. If you want to "force" the use of the custom drag while automatic drag is enabled, hold down the Alt (Windows) or Option (macOS) key during the action. This option is not available for pictures.

For more information, refer to Drag and Drop in the 4D Language Reference manual.

JSON Grammar

NameData TypePossible Values
draggingtext"none" (default), "custom", "automatic" (excluding list box)

Objects Supported

4D Write Pro areas - Input - Hierarchical List - List Box - Plug-in Area

See also

Droppable


Droppable

Control whether and how the object can be the destination of a drag and drop operation.

Two drop modes are available:

  • Custom: In this mode, any drop operation performed on the object triggers the On Drag Over and On Drop form events in the context of the object. You then manage the drop action using a method.
    In custom mode, basically the whole drag-and-drop operation is handled by the programmer. This mode lets you implement any interface based upon drag-on-drop, including interfaces that do not necessarily transport data, but can perform any action like opening files or triggering a calculation. This mode is based upon a combination of specific properties, events, and commands from the Pasteboard theme.
  • Automatic: In this mode, 4D automatically manages — if possible — the insertion of dragged data of the text or picture type that is dropped onto the object (the data are pasted into the object). The On Drag Over and On Drop form events are NOT generated. On the other hand, the On After Edit (during the drop) and On Data Change (when the object loses the focus) events are generated.

For more information, refer to Drag and Drop in the 4D Language Reference manual.

JSON Grammar

NameData TypePossible Values
droppingtext"none" (default), "custom", "automatic" (excluding list box)

Objects Supported

4D Write Pro areas - Button - Input - Hierarchical List - List Box - Plug-in Area

See also

Draggable


Execute object method

When this option is enabled, the object method is executed with the On Data Change event at the same moment the user changes the value of the indicator. When the option is disabled, the method is executed after the modification.

JSON Grammar

NameData TypePossible Values
continuousExecutionbooleantrue, false

Objects Supported

Progress bar - Ruler - Stepper


Method

Reference of a method attached to the object. Object methods generally "manage" the object while the form is displayed or printed. You do not call an object method—4D calls it automatically when an event involves the object to which the object method is attached.

Several types of method references are supported:

  • a standard object method file path, i.e. that uses the following pattern:
    ObjectMethods/objectName.4dm
    ... where objectName is the actual object name. This type of reference indicates that the method file is located at the default location ("sources/forms/formName/ObjectMethods/"). In this case, 4D automatically handles the object method when operations are executed on the form object (renaming, duplication, copy/paste...)

  • a project method name: name of an existing project method without file extension, i.e.: myMethod In this case, 4D does not provide automatic support for object operations.

  • a custom method file path including the .4dm extension, e.g.:
    ../../CustomMethods/myMethod.4dm You can also use a filesystem:
    /RESOURCES/Buttons/bOK.4dm In this case, 4D does not provide automatic support for object operations.

JSON Grammar

NameData TypePossible Values
methodtextObject method standard or custom file path, or project method name

Objects Supported

4D View Pro Area - 4D Write Pro Area - Button - Button Grid - Check Box - Combo Box - Dropdown list - Forms - Hierarchical List - Input - List Box - List Box Column - Picture Button - Picture Pop up menu - Plug-in Area - Progress Indicators - Radio Button - Ruler - Spinner - Splitter - Stepper - Subform - Tab control - Web Area


Movable Rows

Array type list boxes

Authorizes the movement of rows during execution. This option is selected by default. It is not available for selection type list boxes nor for list boxes in hierarchical mode.

JSON Grammar

NameData TypePossible Values
movableRowsbooleantrue, false

Objects Supported

List Box


Multi-selectable

Allows the selection of multiple records/options in a hierarchical list.

JSON Grammar

NameData TypePossible Values
selectionModetext"multiple", "single", "none"

Objects Supported

Hierarchical List


Sortable

Allows sorting column data by clicking a listbox header. This option is selected by default. Picture type arrays (columns) cannot be sorted using this feature.

In list boxes based on a selection of records, the standard sort function is available only:

  • When the data source is Current Selection,
  • With columns associated with fields (of the Alpha, Number, Date, Time or Boolean type).

In other cases (list boxes based on named selections, columns associated with expressions), the standard sort function is not available. A standard list box sort changes the order of the current selection in the database. However, the highlighted records and the current record are not changed. A standard sort synchronizes all the columns of the list box, including calculated columns.

JSON Grammar

NameData TypePossible Values
sortablebooleantrue, false

Objects Supported

List Box


Standard action

Typical activities to be performed by active objects (e.g., letting the user accept, cancel, or delete records, move between records or from page to page in a multi-page form, etc.) have been predefined by 4D as standard actions. They are described in detail in the Standard actions section of the Design Reference.

You can assign both a standard action and a project method to an object. In this case, the standard action is usually executed after the method and 4D uses this action to enable/disable the object according to the current context. When an object is deactivated, the associated project method cannot be executed.

You can also set this property using the OBJECT SET ACTION command.

JSON Grammar

NameData TypePossible Values
actionstringThe name of a valid standard action.

Objects Supported

Button - Button Grid - Check Box - Drop-down List - List Box - Picture Button - Picture Pop-up Menu - Tab control