Saltar para o conteúdo principal
Version: v20 BETA

Ação


Arrastável

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.

Gramática JSON

NomeTipo de dadosValores possíveis
draggingtext"none" (default), "custom", "automatic" (excluding list box)

Objectos suportados

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

Veja também

Soltável


Soltável

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.

Gramática JSON

NomeTipo de dadosValores possíveis
droppingtext"none" (default), "custom", "automatic" (excluding list box)

Objectos suportados

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

Veja também

Arrastável


Executar método objecto

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.

Gramática JSON

NomeTipo de dadosValores possíveis
continuousExecutionbooleantrue, false

Objectos suportados

Progress bar - Ruler - Stepper


Métodos

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.

Gramática JSON

NomeTipo de dadosValores possíveis
methodtextObject method standard or custom file path, or project method name

Objectos suportados

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


Linhas móveis

List box de tipo array

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.

Gramática JSON

NomeTipo de dadosValores possíveis
movableRowsbooleantrue, false

Objectos suportados

List Box


Multi-seleccionável

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

Gramática JSON

NomeTipo de dadosValores possíveis
selectionModetext"multiple", "single", "none"

Objectos suportados

Lista hierárquica


Ordenável

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.

Gramática JSON

NomeTipo de dadosValores possíveis
sortablebooleantrue, false

Objectos suportados

List Box


Ação padrão

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.

Gramática JSON

NomeTipo de dadosValores possíveis
actionstringThe name of a valid standard action.

Objectos suportados

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