To hide the edit box i have used this and works like a charm for me instead of actualy hiding the edit box it just makes it invisible so to speak
Code:
for i = 1, NUM_CHAT_WINDOWS do
local editBoxleft = _G[format("%s%d%s", "ChatFrame", i, "EditBoxLeft")]
local editBoxright = _G[format("%s%d%s", "ChatFrame", i, "EditBoxRight")]
local editBoxmid = _G[format("%s%d%s", "ChatFrame", i, "EditBoxMid")]
editBoxleft:SetAlpha(0)
editBoxright:SetAlpha(0)
editBoxmid:SetAlpha(0)
end