Saltar para o conteúdo principal
Version: v19

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


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).
  • Accept or refuse dragging via $0 in the method of the dragged object.
    • 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.
    • If no result is returned, 4D considers that drag actions are accepted.

4D data are put in the pasteboard before calling the event. 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.