Hi Everyone
I’m writing a BASE application in Windows (v24.8.03), and I have created a non-modal window to let the users know that an operation is executing: There’s just a label in the dialog, no user-interaction is necessary.
When I call the dialog using .SetVisible(true), a blank window appears (with a close window X in the top right corner), with no contents, and which disappears correctly when I issue .SetVisible(false).
Following the examples I have seen in the documentation, I have set up global variables to track whether the dialog has been loaded or not. Additionally, I have a function msgMaker() that translates the message into the user’s language. (When I issue .execute() for a modal dialog, the dialog content appears correctly, but I want non-modal)
I would dearly love to have a non-modal window with the label displaying, if possible without the close window option for the dialog.
I would be grateful for any advice on this. The code is below:
Best wishes,
CB
I execute :
Global oNMDialog AS Object
Global gDlgLoaded AS Boolean
…
If gDlgLoaded = 0 then 'is the dialog already in memory? No
With GlobalScope.BasicLibraries 'not sure I need this...
If ( Not .isLibraryLoaded("Tools") ) Then
.LoadLibrary( "Tools" )
End If
End With
ThisComponent.DialogLibraries.loadLibrary("DlgLib")
oDialogLibrary = ThisComponent.DialogLibraries.GetByName("DlgLib")
oModule=oDialogLibrary.getByName("DlgPlsWaitAdding")
gDlgLoaded = 1
oNMDialog=CreateUnoDialog(oModule)
oLabel1 = oNMDialog.GetControl("Label1")
oLabel1.Text = msgMaker(15) 'set contents to correct language
End if
oNMDialog.setVisible(true)
'issue commands ...
oNMDialog.setVisible(false)