WoW:API FontString SetText: Difference between revisions
Jump to navigation
Jump to search
(added documentation about FontString:SetText) |
No edit summary |
||
Line 8: | Line 8: | ||
Sets the text to be displayed in the fontstring. The text will have the color given to it via the fontinstance definition (or a FontString:SetTextColor call). You may however use a form of simpleHTML to color specific parts of a string, as shown in the example below. | Sets the text to be displayed in the fontstring. The text will have the color given to it via the fontinstance definition (or a FontString:SetTextColor call). You may however use a form of simpleHTML to color specific parts of a string, as shown in the example below. | ||
NOTE: FontString has a limit of ~4000 chars. | |||
== Examples == | == Examples == |
Revision as of 08:44, 14 June 2007
← Widget API ← FontString < SetText
Synopsis
FontString:SetText(string text)
Description
Sets the text to be displayed in the fontstring. The text will have the color given to it via the fontinstance definition (or a FontString:SetTextColor call). You may however use a form of simpleHTML to color specific parts of a string, as shown in the example below.
NOTE: FontString has a limit of ~4000 chars.
Examples
FontString:SetText('|cff000000This text is black,|r |cffff0000while this text will be red.|r')
will return
This text is black, while this text will be red.