Using the Pastebin code and assuming all your button names are consistant starting with "NewbDevBoxButtonFrame" and prefixed with the name in ButtonTable ie.
Code:
local xxx = CreateFrame("Button", "NewbDevBoxButtonFrameLogoutButton", NewbDevBoxButtonFrame, "SecureActionButtonTemplate, GameMenuButtonTemplate")
You could use:
Lua Code:
local function buttonFrameButtonLayout()
for k, v in pairs(ButtonTable) do
thisButton = _G["NewbDevBoxButtonFrame"..k] -- use the name to get the button from the global table.
thisButton:ClearAllPoints()
-- ...
end
end
end
Edit: typos.