API GameTooltip AddLine

104,672pages on
this wiki
Add New Page
Talk0 Share
Widget API ← GameTooltip < AddLine
GameTooltip:AddLine(text [, red, green, blue [, wrapText]]);

Appends a line of text to tooltip.

Arguments Edit

string - text which will appear in new tooltip line
number range 0 to 1 - red color value for text string
number range 0 to 1 - green color value for text string
number range 0 to 1 - blue color value for text string
boolean - 'true' to wrap text.

Returns Edit


Examples Edit

MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT")
MyTooltip:AddLine("New tooltip line", 1, 1, 1)

Details Edit

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.

Notes Edit

  • 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.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki