Wowpedia
Advertisement
Wowpedia
240,483
pages

Allows a frame to receive mouse input.

frame:EnableMouse(enableFlag)
frame:SetMouseMotionEnabled(enableFlag)
frame:SetMouseClickEnabled(enableFlag)

Arguments

enableFlag 
boolean - Whether to enable (true) or disable (false|nil).

Details

  • EnableMouse() is shorthand for calling both SetMouseMotionEnabled() and SetMouseClickEnabled().
  • SetMouseMotionEnabled() controls OnEnter and OnLeave
  • SetMouseClickEnabled() controls OnMouseDown/Up, OnDragStart/Stop and OnClick.
  • Setting a mouse handler automatically enables mouse input.

Patch changes

  • Shadowlands Patch 9.0.1 / API (2020-10-13): Setting motion handlers will also enable full mouse input.
    This was an undocumented change. Previously only click handlers behaved this way.

See also

  • Frame:IsMouseEnabled() - Indicates whether the frame is receiving mouse input.
  • Frame:EnableMouseWheel() - Allows a frame to receive scrolling input.
Advertisement