View Single Post
Unread 08-09-12, 07:58 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,367
Moving Blizzard frames with the same method is no problem aswell.

Lua Code:
  1. --making the colorpicker frame movable
  2. local cpf = ColorPickerFrame
  3. local mover = CreateFrame("Frame", nil, cpf)
  4. mover:SetPoint("TOP",0,0)
  5. mover:SetSize(120,15)
  6. mover:EnableMouse(true)
  7. mover:SetScript("OnMouseDown", function(self,button,...)
  8.   if button == "LeftButton" then
  9.     cpf:StartMoving()
  10.   end
  11. end)
  12. mover:SetScript("OnMouseUp", function()
  13.   cpf:StopMovingOrSizing()
  14. end)
  15. cpf:SetUserPlaced(true)
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline   Reply With Quote