Saltar para o conteúdo principal
Versão: v20

Ação


Arrastável

Controlar se e como o usuário pode arrastar o objeto. Por defeito, não é permitida qualquer operação de arrastamento.

Estão disponíveis dois modos de arrastamento:

  • 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. Por exemplo, o arrastar (e largar) automático permite-lhe copiar um valor entre dois campos sem utilizar a programação:

    Neste modo, o evento do formulário On Begin Drag NÃO é gerado. 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. Esta opção não está disponível para as imagens.

Para mais informações, consulte Arraste e Solte no manual Linguajem 4D.

Gramática JSON

NomeTipo de dadosValores possíveis
draggingtext"none" (por padrão), "custom", "automatic" (exceto list box)

Objectos suportados

Áreas 4D Write Pro - Entrada - Lista hierárquica - List Box - Área de plug-in

Veja também

Soltável


Soltável

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

Há dois modos de soltar em 4D:

  • 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.
  • Automático: neste modo, 4D gere automaticamente - se possível - a inserção de dados arrastados do tipo texto ou imagem largada no objeto (os dados são colados no objeto). Os eventos formulário On Drag Over e On Drop NÃO são gerados. Por outro lado, são gerados os eventos On After Edit (durante a descida) e On Data Change (quando o objeto perde o foco).

Para mais informações, consulte Arraste e Solte no manual Linguajem 4D.

Gramática JSON

NomeTipo de dadosValores possíveis
droppingtext"none" (por padrão), "custom", "automatic" (exceto 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

Referência de um método ligado ao objeto. 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.

São suportados vários tipos de referências de métodos:

  • 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
methodtextCaminho de ficheiro padrão ou personalizado do método objeto, ou nome do método projeto

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

Autoriza a deslocação de linhas durante a execução. Esta opção é selecionada por defeito. 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. Esta opção é selecionada por defeito. Os arrays de tipo imagem (colunas) não podem ser ordenadas com esta funcionalidade.

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

  • Quando a fonte de dados é Seleção atual,
  • 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
actionstringO nome de uma ação normalizada válida.

Objectos suportados

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