Issue 50716 - Basic: Dialog Elements not visible with XPaintListener
Summary: Basic: Dialog Elements not visible with XPaintListener
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows NT
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 14:40 UTC by eberlein
Modified: 2017-05-20 11:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
document with dialog to reproduce the behaviour (8.39 KB, application/vnd.oasis.opendocument.text)
2005-06-14 17:04 UTC, stephan.wunderlich
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description eberlein 2005-06-14 14:40:44 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
Comment 1 stephan.wunderlich 2005-06-14 17:04:46 UTC
Created attachment 27170 [details]
document with dialog to reproduce the behaviour
Comment 2 stephan.wunderlich 2005-06-14 17:06:27 UTC
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.
Comment 3 thomas.benisch 2005-12-07 15:49:50 UTC
TBE->AB: As discussed to you.
Comment 4 ab 2006-05-19 11:27:55 UTC
ab->mt: I have no idea how this behaviour could be caused by
basic or basctl. Is there a problem in awt?
Comment 5 malte_timmermann 2006-05-29 07:15:55 UTC
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.
Comment 6 ab 2006-08-14 13:11:09 UTC
STARTED
Comment 7 Marcus 2017-05-20 11:27:37 UTC
Reset assigne to the default "issues@openoffice.apache.org".