WoW:XML/CheckButton

< XML
Revision as of 04:49, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page XML/CheckButton to XML/CheckButton without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

XML UI ← XML elements < CheckButton

InheritanceEdit

Inherited by: none, Inherits: <Button>, Runtime object: CheckButton
Defined in: Frames, Ui

ElementsEdit

AttributesEdit

  • checked

DetailsEdit

For checkbuttons, setting the label of the checkbutton works differently from normal buttons. Using MyCheckButton:SetText("monkey"); will not give you a visible result. Instead, you need to address the text property of the checkbuttons invisible FontString frame. The FontString frame is named "<checkButtonName>Text", so to address it, use the following Lua code: getglobal(MyCheckButton:GetName() .. "Text"):SetText("Monkey");

ExampleEdit

Included in Backdrop

<CheckButton name="$parentCheckButton" inherits="OptionsCheckButtonTemplate" checked="true">
  <Anchors>
    <Anchor point="LEFT">
    <Offset>
      <AbsDimension x="20" y="0" />
    </Offset>
    </Anchor>
  </Anchors>
</CheckButton>