Apache OpenOffice (AOO) Bugzilla – Issue 50716
Basic: Dialog Elements not visible with XPaintListener
Last modified: 2017-05-20 11:27:37 UTC
The XPaintListener is the only way to execute and dispose a dialog without any user interaction. If you use the focus event from the dialog properties, the macro will be fired with oDlg.execute, but no dialog is visible on screen (should be a separate issue). To reproduce the bug, create a little Dialog1 with a Label1 and a Progressbar1 in the Standard library and execute the following code from the Standard library: Option explicit Private oPaintListener as Any Sub Main() oDlg = CreateUnoDialog(GlobalScope.DialogLibraries.Standard.Dialog1) oPaintListener = CreateUNOListener("Dialog_","com.sun.star.awt.XPaintListener") oDlg.AddPaintListener(oPaintListener) oDlg.SetEnable(False) oDlg.Execute() oDlg.dispose() End Sub Sub Dialog_windowPaint(e) Dim oDlg as Any, oProgressBar as Any, oLabel as Any Dim i as Integer oDlg = e.Source oDlg.RemovePaintListener(oPaintListener) 'Do something and tell the user about it with Labels '(Connecting to datasource and initiate global variables) Wait 2000 'until now the dialog objects are not visible, but they should! oProgressBar = oDlg.GetControl("ProgressBar1") oLabel = oDlg.GetControl("Label1") oLabel.Text = "foo" '??? oDlg.Title = GetProductName() For i = 1 to 100 oProgressBar.Value = i 'Progressbar now visible wait 10 next oDlg.EndExecute() End Sub Peter
Created attachment 27170 [details] document with dialog to reproduce the behaviour
sw->tbe: still reproducible in src680_m106 ... the dialog controls stay invisible until the progressbar changes ... in that moment this control can be seen, but the label stays invisible.
TBE->AB: As discussed to you.
ab->mt: I have no idea how this behaviour could be caused by basic or basctl. Is there a problem in awt?
I think it's the faked modal dialog. Basic Dialogs are always non modal from VCL point of view, but fake to be modal by disabeling the IDE window. AWT shouldn't be the problem here.
STARTED
Reset assigne to the default "issues@openoffice.apache.org".