I am trying to create simple frame that displays text. I definitely made the containing frame wide enough to fit the string but it is still wrapping. The string is multiline (will have multiple \n).
Code:
raidLockoutFrame = CreateFrame("ScrollFrame", "NITRaidLockoutFrame", UIParent, "TooltipBorderedFrameTemplate");
raidLockoutFrame:SetPoint("Center", UIParent, "Center", 0, 0)
raidLockoutFrame:SetWidth(400);
raidLockoutFrame:SetHeight(400);
raidLockoutFrame:SetMovable(true);
local text = raidLockoutFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal");
text:SetPoint("TOPLEFT");
text:SetJustifyH("LEFT");
--text:SetNonSpaceWrap(false);
--text:SetWordWrap(false);
raidLockoutFrame.text = text;
...
raidLockoutFrame.text:SetText(CreateLockoutText())
It ends up wordwrapping to this:
I've looked for solutions, tested word wrapping on the fontstring itself (does not work), and the GetWidth function returns 220 for the string (and I am setting the parent frame width to 400).
Any help out there?