Widget API: GameTooltip:AddLine
← Widget API ← GameTooltip < AddLine
GameTooltip:AddLine(text [, red, green, blue [, wrapText]]);
Appends a line of text to tooltip.
ArgumentsEdit
ReturnsEdit
- none
ExamplesEdit
MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT") MyTooltip:AddLine("New tooltip line", 1, 1, 1) MyTooltip:Show()
DetailsEdit
Note that this only appends the new line to the tooltip. It does not update the tooltip's height/width, so that the newly added line initially appears underneath (outside of) the tooltip.
A subsequent call to GameTooltip:Show() will update the tooltip's borders correctly.
NotesEdit
- As of WoW 2.0, there is no longer a maximum number of lines.
- As of 6.0 uses Lua boolean, rather than WoW Boolean (nil or 1) for wrap text setting.