Controls.TControl.OnDragOver

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Controls.pas

	property OnDragOver: TDragOverEvent read FOnDragOver write FOnDragOver;


Unit: Controls

Type: event

Visibility: protected

Member Of: TControl

C++ Information

From Controls.hpp

	__property TDragOverEvent OnDragOver;


Unit: Controls

Type: property

Visibility: protected

Member Of: TControl

Description

Occurs when the user drags an object over a control.


Use an OnDragOver event to signal that the control can accept a dragged object so the user can drop or dock it.

Within the OnDragOver event handler, change the Accept parameter to false to reject the dragged object. Leave Accept as true to allow the user to drop or dock the dragged object on the control.

To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the DragCursor property for the control before the OnDragOver event occurs.

The Source is the object being dragged, the Sender is the potential drop or dock site, and X and Y are screen coordinates in pixels. The State parameter specifies how the dragged object is moving over the control.

Note:  Within the OnDragOver event handler, the Accept parameter defaults to true. However, if an OnDragOver event handler is not supplied, the control rejects the dragged object, as if the Accept parameter were changed to false.

See Also

Code Samples


Personal tools
Translations
Newest Version