WoW:API FontString SetText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Updated with new information)
mNo edit summary
Line 7: Line 7:
== Description ==
== 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 [[UI_Escape_Sequences|escape sequences]] to modify the string's appearance.
Sets the text to be displayed in the fontstring. The text will have the color given to it via the fontinstance definition (or a [[API_FontString_SetTextColor|FontString:SetTextColor]] call). You may however use [[UI_Escape_Sequences|escape sequences]] to modify the string's appearance.


NOTE: FontString has a limit of ~4000 chars.
NOTE: FontString has a limit of ~4000 chars.

Revision as of 23:04, 25 July 2009

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 escape sequences to modify the string's appearance.

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.

Notes