UICheckButtonTemplate code example
Example: UICheckButtonTemplate
Btn1 = CreateFrame("CheckButton", name, parent, "UICheckButtonTemplate") --
Btn1:SetPoint("TOPLEFT", 0, 00)
Btn1:SetPoint("TOPLEFT", 10, 00)
Btn1.text = _G[name.."Text"]
Btn1.text:SetText("Test")
Btn1:SetScript("OnClick", function(frame)
if frame.isChecked == 1 then
PlaySound("igMainMenuOptionCheckBoxOn")
print("Checked")
else
PlaySound("igMainMenuOptionCheckBoxOff")
print("Unchecked")
end
end)