Hi addon developers,
I am trying to programmatically put together a Frame with an input field and a frame with rows of text + additional buttons. The rows are coming from a table and depending on the content of the input field I would like to filter the rows of the table. I stuck on creating the Frame for this.
This is what I have currently:
local UIConfig = CreateFrame(“Frame”, “MainFrame”, UIParent, “BasicFrameTemplateWithInset”);
UIConfig:SetSize(350,360); – width, height
UIConfig:SetPoint(“CENTER”, UIParent, “CENTER”); – point, relativeFrame, relativePoint, xOffset, yOffset
UIConfig.title = UIConfig:CreateFontString(nil, “OVERLAY”);
UIConfig.title:SetFontObject(“GameFontHighlight”);
UIConfig.title:SetPoint(“LEFT”, UIConfig.TitleBg, “LEFT”, 5, 0);
UIConfig.title:SetText(“Example Text”);
UIConfig:SetMovable(true)
UIConfig:EnableMouse(true)
UIConfig:RegisterForDrag(“LeftButton”)
UIConfig:SetScript(“OnDragStart”, UIConfig.StartMoving)
UIConfig:SetScript(“OnDragStop”, UIConfig.StopMovingOrSizing)
UIConfig.input1Field = CreateFrame(“EditBox”, nil, UIConfig)
UIConfig.input1Field :SetSize(40)
UIConfig.input1Field :SetMultiLine(false)
UIConfig.input1Field :SetAutoFocus(false) – dont automatically focus
UIConfig.input1Field :SetFontObject(“ChatFontNormal”)
I can see the main frame but the input field is not visible. Any ideas why?