Using the "
Canvas" form for a settings panel, I'm unable to deal with check button:
First, it looks weird:
Second, it doesn't work
Lua Code:
local chkButton = CreateFrame("CheckButton", "ChkDarkui", parentFrame, "SettingsCheckBoxControlTemplate")
chkButton:SetPoint("LEFT", subFrame, "RIGHT", 40, 0)
chkButton.Text:SetText("checkbox label ***")
chkButton:SetScript("OnShow", function(self)
print("show button") -- printed
self:SetChecked(true) -- seems ignored !!!!!!!!!!!!!!!
end)
chkButton:SetScript("OnClick", function(self)
print(self:GetChecked(), "check button click TEST")-- nothing happens !!!!!!!!!!!!!!!!!
end)