Maybe your looking for something more like:
Lua Code:
local f = CreateFrame("Frame", "SomeOnEnterFrame")
f:SetSize(200, 200)
f:SetPoint("TOPLEFT")
f.t = f:CreateTexture()
f.t:SetAllPoints()
f.t:SetTexture("abc")
f.t:SetAlpha(0.4)
f:SetScript("OnUpdate", function(self)
if MouseIsOver(self) then
if not self.BigSize then
self.BigSize = true
self:SetSize(400, 400)
end
else
if self.BigSize then
self.BigSize = nil
self:SetSize(200, 200)
end
end
end)
Depending on what else you want to do with the frame.
The setting of BigSize could also include whatever you wanted to do OnEnter/OnLeave.