Posted by Jon252 on Thu, 23 Sep 2010 15:00:29
Hi OK I have bought the book and worked through some of the examples and seem to get on OK apart from some spelling issues on my part. I like to create my frames using XML rather than LUA and I want my frame to be draggable and resizable too first question I see in the book a refference to CreateTitleRegion which seems like a sensible way to havea draggable frame but I am unsure how to implement this into the code ?? and secondly How do I re-size my frame I have looked at code for a few of the addons I have and they use little Grab Handles but cannot fathom how these work any help be much appreciated
Posted by jnwhiteh on Thu, 23 Sep 2010 15:18:52
Indeed, it's just another element called
<TitleRegion>. You can't do much with it, but you can name it, give it scripts and anchor it.
As for resizing your frame, first enable resizing by running
frame:SetResizable(true). Then type in your chat box
/run frame:StartSizing(), put your mouse over the frame and then hit enter. You should be able to move the mouse and resize the frame (being able to see this will depend on how your textures are anchored). You can stop this by running
frame:StopMovingOrSizing(). That's just how you'd do it!