Ok, raised an UI error previously - messed up syntax. But now i see neither an error, nor an added editbox...
Code:
function BBS_Initialize()
local backpack = ZO_PlayerInventoryBackpack
local wm = WINDOW_MANAGER
local inv = ZO_PlayerInventory
local editbox = wm:CreateControl("BBS_ToplevelTest", inv, CT_EDITBOX)
editbox:SetParent(inv)
editbox:SetAnchor(TOPLEFT, inv, TOPLEFT, 0, 10)
editbox:SetResizeToFitDescendents(true)
editbox:SetWidth(510)
editbox:SetMouseEnabled(true)
end
-- Hook initialization onto the EVENT_ADD_ON_LOADED listener
EVENT_MANAGER:RegisterForEvent(EVENT_ADD_ON_LOADED, BBS_Initialize())