How to make non-modal dialog?

Dialog in Calc is modal usually. I need to use non-modal dialog. How to create non-modal dialog or change modal to non-modal by macro?

Hi

The principle is to use the setVisible method and not Execute. This makes visible the dialog and makes it not modal.

However it is necessary to manage the loop: view dialog as a condition for display remains true.

In the attached NonModalDialog.ods example I test a global variable whose value is changed by the procedure called by the Quit button. The same procedure is launched when clicking on the system box (top right cross) to close the form.

Again it is necessary to manage “yourself” event. This is done by a listener added to the dialog.

One last important thing: in the display loop must “let the hand” to the system for the user to work. This is done with a Wait instruction

Regards

Thanks a lot! Will try.