Skip to content
Phanx edited this page Nov 26, 2014 · 3 revisions

PhanxConfig-Checkbox

Simple checkbox widget generator for GUI configuration. Requires LibStub.

Usage:

lib = LibStub("PhanxConfig-Checkbox")

Library Methods:

Create a checkbox widget:

checkbox = lib:New(parentFrame, labelText[, tooltipText])

Arguments:

  1. parentFrame - frame reference
  2. labelText - string; text to be displayed next to the checkbox
  3. tooltipText - string; text to be be displayed in a tooltip when moving the cursor over the checkbox (optional)

Alternate syntax for embedding:

checkbox = lib.CreateCheckbox(parentFrame, labelText[, tooltipText])

Widget Callbacks:

Set a function to be run when the checkbox is clicked:

checkbox.OnValueChanged = function(self, isChecked) ... end

License

Copyright © 2009–2014 Phanx. All rights reserved. You MAY distribute this library WITHOUT CHANGES inside addons that make use of it. You MAY NOT distribute this library by itself or with changes. You MAY use any or all of the source code from this library in your own library or addon, as long as you do not use the name of this library or the name of its author anywhere in your work outside of an optional attribution. See the comment header in the library file for more details.