Ask Your Question

How to make non-modal dialog? [closed]

asked 2016-02-04 16:27:26 +0200

shma_lo gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by shma_lo
close date 2016-03-05 20:05:58.493240

1 Answer

Sort by » oldest newest most voted

answered 2016-02-07 08:24:49 +0200

pierre-yves samyn gravatar image


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


edit flag offensive delete link more


Thanks a lot! Will try.

shma_lo gravatar imageshma_lo ( 2016-02-09 19:20:02 +0200 )edit

Question Tools

1 follower


Asked: 2016-02-04 16:27:26 +0200

Seen: 675 times

Last updated: Feb 07 '16