Created
August 6, 2019 22:11
-
-
Save mooreatv/c740e234c7d5752f78341d1c6fa52132 to your computer and use it in GitHub Desktop.
Minimal Scrolling Editbox (wow addon / lua)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local s = CreateFrame("ScrollFrame", nil, UIParent, "UIPanelScrollFrameTemplate") -- or your actual parent instead | |
s:SetSize(300,200) | |
s:SetPoint("CENTER") | |
local e = CreateFrame("EditBox", nil, s) | |
e:SetMultiLine(true) | |
e:SetFontObject(ChatFontNormal) | |
e:SetWidth(300) | |
s:SetScrollChild(e) | |
local text = "" | |
for i=1,100 do | |
text = text .. "line " .. tonumber(i) .. "\n" | |
end | |
e:SetText(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment