WoW:API GameTooltip AddLine: Difference between revisions
Jump to navigation
Jump to search
GameTooltip:AddLine -Documentation by Goatus-
(WoW 2.0 update) |
m (updated reference to Gametooltip:Show()) |
||
Line 41: | Line 41: | ||
MyTooltip:AddLine("New tooltip line", 1, 1, 1); | MyTooltip:AddLine("New tooltip line", 1, 1, 1); | ||
MyTooltip:Show(); | MyTooltip:Show(); | ||
---- | |||
;''Details'' | |||
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.<br /> | |||
A subsequent call to [[API_Region_Show|GameTooltip:Show()]] will update the tooltip's borders correctly. |
Revision as of 02:39, 26 May 2007
← Widget API ← GameTooltip < AddLine
GameTooltip:AddLine(tooltipText [, textColor.r, textColor.g, textColor.b [, wrapText]]);
Appends a line of text to tooltip. (As of WoW 2.0, there is no longer a maximum number of lines.)
- Arguments
- (tooltipText [, textColor.r, textColor.g, textColor.b [, wrapText]])
- tooltipText
- String - string which will appear in new tooltip line
- textColor.r
- range 0 to 1 - red color value for text string
- textColor.g
- range 0 to 1 - green color value for text string
- textColor.b
- range 0 to 1 - blue color value for text string
- wrapText
- nil or 1 - Set to 1 to wrap text.
- Returns
- nothing
- Example
MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT"); MyTooltip:AddLine("New tooltip line", 1, 1, 1); MyTooltip:Show();
- Details
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.