View Single Post
03-27-19, 08:24 PM   #2
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
You should use the ScrollingMessageFrame instead of the MessageFrame. Like

Lua Code:
  1. local frame = TestMessage or CreateFrame("ScrollingMessageFrame", "TestMessage", UIParent)
  2.  
  3. frame:SetPoint("CENTER")
  4. frame:SetSize(300, 60)
  5. frame:SetTimeVisible(120.0);
  6. frame:SetMaxLines(128);
  7. frame:SetFontObject(ChatFontNormal);
  8. frame:SetIndentedWordWrap(true);
  9. frame:SetJustifyH("LEFT");
  10.  
  11. for i = 1, 100 do
  12.     frame:AddMessage("hello world")
  13. end

The ScrollingMessageFrame is an intrinsic type, you can find more details in https://github.com/tomrus88/Blizzard...ssageFrame.lua
  Reply With Quote