//edit: Found the workaround anyway it is to change the parent to another control but it is not really explaining why the API returns hidden while the control was visible on screen
In wow if you test this the header is hidden and IsHidden would return true
In Eso, the frame is NOT hidden and IsHidden returns true (well to say true: it is hidden but still visible on your screen)
To use, run /buggy to show the global frame + header and /buggy2 supposed to hide the header
Code:
local frameGlobal = CreateControl(nil, GuiRoot, CT_TOPLEVELCONTROL)
local frameHeader = CreateControl(nil, frameGlobal, CT_TOPLEVELCONTROL)
local backdropHeader = CreateControl(nil, frameHeader, CT_BACKDROP)
frameGlobal:SetHeight(500)
frameGlobal:SetWidth(1024)
frameGlobal:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, 512 , 250)
frameHeader:SetHeight(50)
frameHeader:SetAnchor(TOPLEFT, frameGlobal, TOPLEFT, 0 , 0)
frameHeader:SetAnchor(TOPRIGHT, frameGlobal, TOPRIGHT, 0 , 0)
backdropHeader:SetAnchorFill(frameHeader)
backdropHeader:SetEdgeColor(1, 1, 1, 1)
backdropHeader:SetEdgeTexture("", 128, 1, 1, 0)
backdropHeader:SetCenterColor(128/255, 128/255, 128/255, 1)
backdropHeader:SetCenterTexture("", 16, 0)
backdropHeader:SetInsets(5, 5, -5, -5)
frameGlobal:SetHidden(true)
SLASH_COMMANDS["/buggy"] = function() frameGlobal:SetHidden(false) end
SLASH_COMMANDS["/buggy2"] = function() frameHeader:SetHidden(true) d("frameHeader:IsHidden(): "..tostring(frameHeader:IsHidden())) end