LM.GUI.CheckBox(label, msg)

Version added: before 9.5

Creates a new LM_CheckBox object

ArgumentTypeDescriptionDefaultVer
labelcharA text label to appear at the side of the check box< 9.5
msgint32A message value to be triggered when the button is pressed0< 9.5

Return type: LM_CheckBox

Use this method to create a new LM_CheckBox object.

Example:
-- *** Dialog: ***
local MyDialog = {} -- empty table

-- declare the dialog:
function MyDialog:new(moho)
local d = LM.GUI.SimpleDialog("CheckBox Test", MyDialog)
local l = d:GetLayout()

-- create a new LM_CheckBox object:
d.MyCheckBox = LM.GUI.CheckBox("My Check Box")

-- add the checkbox to the layout:
l:AddChild(d.MyCheckBox)

return d
end

function MyScript:Run(moho)
-- initiate the dialog:
local dlog = MyDialog:new(moho)
if (dlog:DoModal() == LM.GUI.MSG_CANCEL) then
return
end
end

And here's the result:
Image

Dialog with a check box


See also: LM_CheckBox:SetValue, LM_CheckBox:Value
String "CheckBox" is found in the following scripts:

HS Shape (by hayasidist)