Quantcast
CheckButtons - WoWInterface
Thread Tools Display Modes
05-09-14, 03:19 PM   #1
TULOA
A Wyrmkin Dreamwalker
 
TULOA's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 50
CheckButtons

Figured it out... Dang guide here was inaccurate. I had to declare it like:

Code:
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)

Last edited by TULOA : 05-09-14 at 04:15 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » CheckButtons

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off