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

On Begin Drag Over

CodePode ser chamado porDefinição
174D Write Pro area - Button - Button Grid - Check Box - Dropdown list - Form - 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 - Tab controlUm objecto está a ser arrastado

Descrição

O evento de formulário On Begin Drag Over pode ser seleccionado para quaisquer objectos de formulário que possam ser arrastados. It is generated in every case where the object has the Draggable property. It can be called from the method of the source object or the form method of the source object.

Unlike the On Drag Over form event, On Begin Drag Over is called within the context of the source object of the drag action.

The On Begin Drag Over event is useful for preparing of the drag action. Pode ser usado para:

  • Add data and signatures to the pasteboard (via the APPEND DATA TO PASTEBOARD command).
  • Use a custom icon during the drag action (via the SET DRAG ICON command).
  • Aceitar ou recusar o arrastamento através de $0 no método do objeto arrastado.
    • To indicate that drag actions are accepted, the method of the source object must return 0 (zero); you must therefore execute $0:=0.
    • To indicate that drag actions are refused, the method of the source object must return -1 (minus one); you must therefore execute $0:=-1.
    • Se nenhum resultado for retornado, 4D considera que as ações de arrastar são aceitas.

Os dados 4D são colocados na prancheta antes de chamar o evento. For example, in the case of dragging without the Automatic Drag action, the dragged text is already in the pasteboard when the event is called.