Wikia

WoWWiki

Talk:Making Draggable Frames

101,310pages on
this wiki

Back to page

Its all very well that we can drag frames around....
But this can in some circumstanses make the frame disapear (for instance when changing resolution).

So how would one move a frame that cant be reached by mouse?
One possibility would be to make a slash command that moves the frame to a default position...
Im yet to find a way to do this.
I have tried stuff like

getglobal(<nameOfFrame>):SetPoint("CENTER","UIParent","CENTER",0,0)

but this does not seem to work.
Maisha - 23 March 2006

Answer Edit

If u do a

getglobal(<nameOfFrame>):ClearAllPoints()

before using SetPoint(...) it will work..

Just found out

Maisha - 23 March 2006 a little later than first post

Minor Code Correction: Using OnMouseDown / OnMouseUp Edit

I have modified the example code to include an additional parameter in the two mouse event handlers called "button." The previous versions lacked a second parameter, although a "button" variable was being used in the function body. This variable never evaluated to "LeftButton" (i.e., it was always nil) so the frame would never drag.

Simple fix, just wanted to document the change. CaptainFlan (talk) 04:28, March 4, 2011 (UTC)

Around Wikia's network

Random Wiki