dlg_add_button()

Adds a button to a custom dialog window.

Syntax

dlg_add_button(handle, name)
dlg_add_button(handle, name, text)
dlg_add_button(handle, name, text, param)

Parameters

Parameter Type Description
handle String The dialog handle.
name String The name of the button.
text String The label displayed on the button. Optional
param String An optional parameter associated with the button. Optional

Return Value

Examples

hnd = dlg_new("Find");
dlg_add_label(hnd, "", "Where is it?");
dlg_add_button(hnd, "", "Here", "btn1");
dlg_add_button(hnd, "", "Here", "btn2");
dlg_comp_pos(hnd, 70, -1);
dlg_add_button(hnd, "", "Here", "btn3");
dlg_comp_pos(hnd, 140, -1);
dlg_show(hnd);
print("you clicked btn1 ", btn1, " times");
print("you clicked btn2 ", btn2, " times");
print("you clicked btn3 ", btn3, " times");

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