View Single Post
11-25-14, 03:06 PM   #10
Zireko
An Aku'mai Servant
Join Date: Nov 2014
Posts: 38
I've got this part working slightly but running into a problem. I have a checkbox and I'm trying to lock the frame. Problem is when you click the checkbox it locks the frame but when you un check the box it will not unlock my frame. I know it's in my function I'm just not sure what I'm doing wrong here.

LUA

Lua Code:
  1. barQWindowLockCheckButton = CreateFrame("CheckButton", "barQWindowLockCheckButton_GlobalName", ZBarOptionFrame, "ChatConfigCheckButtonTemplate");
  2. barQWindowLockCheckButton:SetPoint("TOPLEFT", 25, -145);
  3. barQWindowLockCheckButton_GlobalNameText:SetText("Frame 1 Lock");
  4. barQWindowLockCheckButton.tooltip = "This is will lock the frame in place.";
  5. barQWindowLockCheckButton:SetScript("OnClick",
  6.   function()
  7.     if barQWindow:SetMovable(true) then
  8.         barQWindow:SetMovable(true)
  9.     else
  10.         barQWindow:SetMovable(false)
  11.     end
  12.   end
  13. );

So can anyone tell me what I'm doing wrong here?
  Reply With Quote