WoW:API CreateFrame: Difference between revisions

no edit summary
No edit summary
Line 43: Line 43:
** Creating frames on the fly for occasions when you don't know how many frames will be needed.
** Creating frames on the fly for occasions when you don't know how many frames will be needed.
** Creating infrequently used frames "on demand", for example: config dialogs, raid frames.
** Creating infrequently used frames "on demand", for example: config dialogs, raid frames.
* Never forget to unset the frames parent, if you want to get rid of a frame. I would suggest to hide the frame via frame:[[API_Region_Hide|Hide]]() and to use frame:[[API_Region_SetParent|SetParent]](nil) afterwards (this will remove the frame from its parents child list). If you just hide the frame without this additional step, the frame will keep alive. If you add a new frame, it will get a higher [[FrameLevel|framelevel]] then the hidden one. After a while you will get frames at maximum [[FrameLevel|framelevel]] which are likely to be drawn in a distorted way (false order caused by equal [[FrameLevel|framelevel]]).
Anonymous user