Example
Creates a metamethod on the DCheckBox class to print any changes to the console.
function DCheckBox:
OnChange(bVal)
if (bVal)
then
print(
"Checked!")
else
print(
"Unchecked!")
end
end Output: All new checkboxes created will print Checked!
or Unchecked!
when their checked state is changed.