Skip to main content
Every Add* call returns a handle. That’s how you interact with the control after creating it. Call methods with : syntax (handle:GetValue()). Everything here works on every control. The per-widget pages only document extras.

Value

Most controls have one main value (a boolean on Toggle, a number on Slider, …). Use GetValue, SetValue, and OnChange for that. Button and a few others don’t, so use their own callbacks instead.

GetValue

Read the control’s current value.

SetValue

Change the control’s value. Single argument only.
any
required
Must match the widget’s value type.

OnChange

Run cb(newValue) every time the value changes: user edits, SetValue, SetState.
() -> ()
A function you call to stop listening.

GetText / SetText

Read or change the control’s label.

Get / Set

Read or change other properties on the control (e.g. "formattedValue" on a Slider).

Watch

Listen for changes to a specific property. Returns an unsubscribe function.

Has

Check whether the control has a given property.

SetVisible / IsVisible / OnVisibleChange

Show or hide the row. SetVisible returns self for chaining.

SetTip

Hover tooltip. Pass nil to remove.
string | table | nil
A string, or { title?, body? } for a two-part tooltip.

OverrideValue

Force the control’s value without changing what the UI shows. See Overrides.
number
default:"0"
Highest priority wins when multiple scripts override the same control.
OverrideHandle
Released automatically on script unload.

IsOverridden

True while any override is active on this control.

Destroy

Remove the control from the UI.

Exists

true if the control still exists in the menu.

Other methods

If you call a method that isn’t listed here, it’s passed through to the control itself. See the per-widget pages.