dlg_add_checkbox()

Adds a checkbox component to a dialog.

The checkbox can have an initial checked state and an optional parameter name.

Syntax

planetcnc.dlg_add_checkbox(handle, name, values, value=0, param=None)

Parameters

Parameter Type Description Comment
handle string Handle of the dialog to modify.
name string Name identifier for the checkbox.
values string Pipe-separated string containing items.
value int Number of checked item optional
param string Optional parameter name for value storage. optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
dlg_handle = planetcnc.dlg_new("Examples")
 
# Add a checkbox component to a dialog with default unchecked state
planetcnc.dlg_add_checkbox(dlg_handle, "Animal", "|Bear|Birds, Bees|Alligator|Ox|Hummingbird|Rattlesnake", 1)
 
planetcnc.dlg_show(dlg_handle)

See also

dlg_add_option
dlg_add_separator
dlg_add_image
dlg_add_label
dlg_add_checkbox
dlg_add_num_input
dlg_add_txt_input
dlg_add_dropbox
dlg_add_button