View Single Post
08-11-18, 06:16 AM   #3
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
This is what I use in my personal UI:
Code:
local function SetPosition(frame, ...)
    if type(frame) == 'string' then
        UIPARENT_MANAGED_FRAME_POSITIONS[frame] = nil
        frame = _G[frame]
    end
    if type(frame) == 'table' and type(frame.IsObjectType) == 'function' and frame:IsObjectType('Frame') then
        local name = frame:GetName()
        if name then
            UIPARENT_MANAGED_FRAME_POSITIONS[name] = nil
        end
        frame:SetMovable(true)
        frame:SetUserPlaced(true)
        frame:SetDontSavePosition(true)
        frame.ignoreFramePositionManager = true
        if ... then
            frame:ClearAllPoints()
            frame:SetPoint(...)
        end
        frame:SetMovable(false)
    end
end
Then you just need to do:
Code:
SetPosition(MainMenuBar, "BOTTOM", cDataMainPanel, "TOP", 0, 10)

SetPosition(ExtraActionBarFrame, "CENTER", MainMenuBar, "TOP", 0, 100)
But you didn't say what issues you were having so I don't know if taint was your problem or if the frames were moving on you.
  Reply With Quote