Making of a non-modal dialog
Hello,
I want to write an macros for Calc that
shows an non-modal dialog. It should be non-modal because the user
must input a cell-range and doing it non-modal allows him to look at his
cells and scroll them while typing.
So how to do that?
Making of a non-modal dialog?
Re: Making of a non-modal dialog?
Basic language?
Store your dialog in a global variable. Instead of executing the dialog, just make it visible.
Store your dialog in a global variable. Instead of executing the dialog, just make it visible.
Code: Select all
Global g_Dlg
Sub Main
oLib = DialogLibraries.MyLibrary
g_Dlg = CreateUnoDialog(oLib.getByName("Dialog1"))
g_Dlg.setVisible(True)
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Making of a non-modal dialog?
When I start a script, dialogue appears and disappears
What to do?
What to do?
Re: Making of a non-modal dialog?
Search for both words "modal dialog" in the old API sub-forum http://www.oooforum.org/forum/search.phtml
There are plenty of examples. I think you need something like:
There are plenty of examples. I think you need something like:
Code: Select all
Global g_Dlg, g_Stop as Boolean
Sub Main
...
REM test status every second:
do until gStop
wait 1000
loop
g_Dlg.setVisible(False)
...
Sub someEvent()
g_Stop = True
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice