Thread Tools Display Modes
12-20-06, 08:10 AM   #1
Porrohman
A Defias Bandit
Join Date: Dec 2006
Posts: 3
text in a frame

is it possible to display text in a frame from lua (have managed from xml) but so far have been unable to do it from the lua code

I have set up a frame in xml and added a fontstring

xml:
<FontString name="bunnyFrameHeaderText" inherits="DialogButtonNormalText" text="RRRR">
<Anchors>
<Anchor point="CENTER" relativeTo="bunny" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-10" />
</Offset>
</Anchor>
</Anchors>

</FontString>

I can access the fontstring & output it to the default chat using
text = bunnyFrameHeaderText:GetText();
DEFAULT_CHAT_FRAME:AddMessage(text)

but as soon as I try to change the fontstring I get attempt to call method 'settext' (a nil value) using
bunnyFrameHeaderText:settext("text")

Last edited by Porrohman : 12-20-06 at 09:15 AM.
  Reply With Quote
12-25-06, 10:48 AM   #2
sibbor
A Deviate Faerie Dragon
Join Date: Nov 2005
Posts: 10
Originally Posted by Porrohman
but as soon as I try to change the fontstring I get attempt to call method 'settext' (a nil value) using
bunnyFrameHeaderText:settext("text")
It's case-sensitive so use
Code:
bunnyFrameHeaderText:SetText("text");
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » text in a frame


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off