dlg_add_checkbox()

Adds a checkbox to a dialog window.

Syntax

dlg_add_checkbox(handle, name, values, value, param)

Parameters

Parameter Type Description
handle String The handle of the dialog.
name String The name to display before the checkbox.
items String Values for the checkbox.
value Number Number of checked item. Optional
param String The parameter name associated with the checkbox. Optional

Return Value

Examples

hnd = dlg_new("My dialog");
dlg_add_checkbox(hnd, "My selection", "|", 0, "selection");
dlg_show(hnd);
print("selection: ", selection);
hnd = dlg_new("Select origin");
dlg_add_checkbox(hnd, "Origin", "|None~|\ | |\~ |\ | ", 1, "myorig");
dlg_show(hnd);
print("myorig: ", myorig);
hnd = dlg_new("Select Animal");
dlg_add_checkbox(hnd, "Animal", "|Bear|Birds, Bees|Alligator|Ox|Hummingbird|Rattlesnake", 1, "myanimal");
dlg_show(hnd);
print("myanimal: ", myanimal);
hnd = dlg_new("Select Flower");
dlg_add_checkbox(hnd, "Flower", "|Rose~|Lilly, Wild~|Magnolia~|Tulip~|Oleander~|Daisy~", 1, "myflower");
dlg_show(hnd);
print("myflower: ", myflower);
hnd = dlg_new("Select Planet");
dlg_add_checkbox(hnd, "Planet", "|Mercury|\Venus|\Earth|\Mars|\Jupiter|\Saturn|\Uranus|\Neptune", 1, "myplanet");
dlg_show(hnd);
print("myplanet: ", myplanet);

See also

dlg_new
dlg_show

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

dlg_comp_pos
dlg_comp_size
dlg_comp_color
dlg_comp_font
dlg_comp_name
dlg_comp_value
dlg_comp_callback