View Single Post
05/14/17, 08:49 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
If you mean a text tooltip it should work the same as with the checkbox.
Use the OnMouseEnter handler to show, and OnMouseExit handler to hide the text tooltip.

Something like that:

myControl is your label control.
e.g. set the tooltip text to the label itseelf before
myControl.tooltipText = "Test tooltip text"

Lua Code:
  1. myControl:SetHandler("OnMouseEnter", function(self)
  2.   ZO_Tooltips_ShowTextTooltip(self, BOTTOM, self.tooltipText)
  3. end)
  4.  
  5. myControl:SetHandler("OnMouseExit", function(self)
  6.    ZO_Tooltips_HideTextTooltip()
  7. end)
  Reply With Quote