As merlight said, when you want to show tooltip call (arguments in square bracket can be nil):
Code:
InitializeTooltip(tooltipControl, [owner, point, offsetX, offsetY, relativePoint])
and then set item information using one of the set methods:
Code:
tooltipControl:SetLink(itemLink)
tooltipControl:SetBagItem(bagId, slotIndex)
When you want to close tooltip, call:
Code:
ClearTooltip(tooltipControl)
You can use one of existing tooltips (ItemTooltip, PopupTooltip, ...) or create your own, but using of the existing tooltip is easier.
Lua Code:
local function ShowTooltip(self)
InitializeTooltip(ItemTooltip, self)
ItemTooltip:SetLink(itemLink)
end
local function HideTooltip(self)
ClearTooltip(ItemTooltip)
end
yourControl:SetHandler("OnMouseEnter", ShowTooltip)
yourControl:SetHandler("OnMouseExit", HideTooltip)
Similar topic:
http://www.esoui.com/forums/showthread.php?t=1647