Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-17-22, 04:35 AM   #3
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
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:
  1. local chkButton = CreateFrame("CheckButton", "ChkDarkui", parentFrame, "SettingsCheckBoxControlTemplate")
  2. chkButton:SetPoint("LEFT", subFrame, "RIGHT", 40, 0)
  3. chkButton.Text:SetText("checkbox label ***")
  4. chkButton:SetScript("OnShow", function(self)
  5.     print("show button") -- printed
  6.     self:SetChecked(true) -- seems ignored !!!!!!!!!!!!!!!
  7. end)
  8. chkButton:SetScript("OnClick", function(self)
  9.     print(self:GetChecked(), "check button click TEST")-- nothing happens !!!!!!!!!!!!!!!!!
  10. end)
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
 

WoWInterface » PTR » PTR General Discussion » How to build an addon settings panel?


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