Combine Dialog.Template and Dialog.Buttons

Right now I have a dialog that shows a simple message and has depending on the situation a different set of buttons. Now i want to add a simple checkbox for an advanced behaviour. Thus i would need a dialog template (showing the message and the checkbox) and ideally i could use the buttons property of the dialog to show the buttons i need.

	var dlg = clickData.func.Dlg;
	dlg.template = "DeleteOptions";
	dlg.buttons = "Yes|No"; //created dynamically
	var result = dlg.Show();

nor the detached version

	dlg.detach = true;
	dlg.template = "DeleteOptions";
	dlg.title = "Delete matching";
    dlg.buttons = "Yes|No"; //created dynamically

    while (true) { ...

shows the buttons i tried to apply to the dialog. Is there any chance to make that work without having a lot of different dialog templates for each situation or creating a xml template dynamically ?


1 Like

You can add up to 5 checkboxes without needing to use a dialog template. See the dialog.options property.

If you do use a dialog template then none of the things that automatically build a dialog without a template will work. You have to use one type of dialog or the other. If using a template, you can show and hide controls individually. But you shouldn't need a template at all for this.

1 Like

thats what i looked for. Just had the choices property in mind.

1 Like