What is the proper way to make a resizeable messageframe?
I made a message frame that is seemingly stable but when reziing it, sometimes, it loses one of the the three lines it has to show and it shows only two from thereon regardless of further resizing unless /reload.
I do not know if it's a system quirk or something I've done.
The message frame is made with
msg_frame = CreateFrame("MessageFrame", "Msg_Frame", main_frame);
msg_frame:SetFading(false); -- do not fade
msg_frame:SetInsertMode("BOTTOM"); -- start from bottom
msg_frame:SetJustifyH("RIGHT"); -- justify right to arrange numbers in a readable fashion
It's sized with
msg_frame:SetFont("Fonts\\FRIZQT__.TTF", size, "OUTLINE");
msg_frame:SetWidth(DEFAULT_WIDTH); -- a big number
msg_frame:SetHeight(size*4);
It's then populated with
msg_frame:AddMessage("text line 1");
msg_frame:AddMessage("text line 2");
msg_frame:AddMessage("text line 3");
I suspect the "ninja" way of resizing it with "size*4" may need improvement but not sure if the instability comes from there.
edit: By the way, even with a "SetScale", the instability of losing a line sometimes occured.
Last edited by tobindax : 06-22-11 at 10:02 AM.
|