Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:UIHANDLER OnEnter
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{widgethandler}}<br> == Description == The OnEnter handler is called when the user mouse pointer enters the frame. A typical use for this event is to pop up a help tooltip, or a menu with option choices (for instance on a minimap button). The opposite of OnEnter is [[UIHANDLER OnLeave|OnLeave]]. If you decide to show something in OnEnter you should hide it again in the [[UIHANDLER OnLeave|OnLeave]] event handler. == Arguments == self - the frame being entered motion - unknown == Example == This example illustrates how to use OnEnter and [[UIHANDLER OnLeave|OnLeave]] to display a mouseover help text in the GameTooltip. Declare the event handlers in the "Scripts" section of your frame: <Frame name="MyFrame"> <Scripts> <OnEnter> MyFrame_OnEnter() </OnEnter> <OnLeave> MyFrame_OnLeave() </OnLeave> </Scripts> </Frame> Place the actual functions in one of your LUA files: function MyFrame_OnEnter() GameTooltip_SetDefaultAnchor( GameTooltip, UIParent ) GameTooltip:SetText( "This text shows up when you mouse over\nthe MyFrame frame" ) GameTooltip:Show() end function MyFrame_OnLeave() GameTooltip:Hide() end
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Widget
(
edit
)
Template:Widgethandler
(
edit
)