Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement
RegisterForDrag -Documentation by AeroBrain-

Registers the object to be draggable by the specified mouse button(s).

obj:RegisterForDrag(mousebuttons);

Arguments
mousebuttons
The mouse button(s) that can be used to drag the object around the user interface.

Returns
nil

Example
myAddonFrame:RegisterForDrag("LeftButton");
Result
Would allow the frame named 'myAddonFrame' to be able to be dragged by the user with the left mouse button.
Note: Also makes it so OnMouseUp only fires for those buttons if the cursor is over the frame.

Description
Registers which mouse buttons may be used to drag the object around the user interface.
Use the action this:StartMoving(); in the <OnDragStart> section in your XML to allow the drag action to move your frame.

Template:WoW API

Advertisement