Moving a control with
View Single Post
02/02/19, 01:03 AM
Join Date: Apr 2016
Originally Posted by
One option would be to set the anchor of the parent to be relative to the green square. For example,parent:SetAnchor(TOPLEFT, greenSquare, TOPLEFT, 0,0)
Another option (if that doesn't work) would be to use the OnMoveStart and OnMoveStop of the green square, and put something like:
EVENT_MANAGER:RegisterForUpdate("moving", 10, moveParentToGreenSquare)
AH of course! The green square needs to be the parent, not the icon. I use the register function to update the coordinates in realtime when draging the control around.
Thanks for your help, guys!
View Public Profile
Send a private message to Letho
Find More Posts by Letho