Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-17-14, 05:03 PM   #1
benots4
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 20
Overwriting text

I am making something like a scroll frame, a frame containing several rows of frames that I want to write text in and then scroll through. I can do that fine only each update writes the new text over the top of the old text, making it unreadable. Addons like Auctioneer do this all the time so I must be missing something.

Creating the subframes and text looks like this
Code:
function GGCreatePDField(Name, Parent, Point, ofsx , ofsy, fwidth, fheight, text)
	local f = CreateFrame("Frame", Name, Parent)				
	f:SetPoint(Point, ofsx,ofsy )
	f:SetWidth(fwidth)
	f:SetHeight(fheight)
	f.text = f:CreateFontString("$parentName", "OVERLAY")
	f.text:SetTextColor(1, 1, 1, 1)
	f.text:ClearAllPoints()
	f.text:SetPoint("LEFT", f, "LEFT")
	f.text:SetJustifyH("LEFT")
	f.text:SetJustifyV("TOP")
	f.text:SetFont(STANDARD_TEXT_FONT, 12, "OUTLINE")
	f.text:SetText(text)
	return f.text
	end
The display loop looks like this

Code:
	for i = 1, displayRows  do
		charLevel = GGCreatePDField("Level", GroupMemberList, "TOPLEFT", 6,-ofsy , 40, 16,nil)
		charLevel:SetText(pInfoArray[v].Level)
		ofsy = ofsy + displayRowHeight
		i=i + 1
		v = v + 1
	end
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Overwriting text

Thread Tools
Display Modes

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