Quantcast
WoWInterface - View Single Post - Resizing Frames
Thread: Resizing Frames
View Single Post
05-06-18, 02:12 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Actually after looking at the grand total of 3 objects in the default UI that are resizable using this method, I think the (main) problem is that you need to specify a direction in which to resize the frame, like:

Code:
object:StartSizing("BOTTOMRIGHT")
References:
If you want your frame to be resizable by any edge or corner, then you'll need to do some math to figure out which edge or corner to use based on the cursor location on mousedown.

The other option would be to add additional "drag handle" buttons on top of your frame, each sized and placed appropriately, and call "object:GetParent():StartSizing(point)" in their mousedown handlers. You can see that technique in use in my chat addon (written so long ago I'd forgotten about it initially) here:

https://github.com/phanx-wow/PhanxCh...esizeEdges.lua

You could make them invisible, or have them only appear when the shift button was pressed (by registering for the MODIFIER_STATE_CHANGED event on your frame).
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote