Hi Stewart,
 
The withdraw() is supposed to hide the dialog - isn't it? 
 
I followed the example code shown for the MessageDialog i.e. the dialog is created when the application starts/initialises, so it needs to be 'hidden' until it is required to be displayed - hence the withdraw(). The same example code then displays the dialog (when required) using the activate() method - somewhere along the line I threw in the show() method in one of my attempts at getting the dialog into the uppermost position - and have just left it there as it doesn't seem to hurt or hinder :-)
 
I haven't tried creating the dialog when it needs to be activated - I thought the concept of creating it at application initialisation was quite good and just showing it when required would be appropriate (especially as my application actually has more than one of these dialogs). If I can't solve this 'display' problem any other way then I might have to do that - or perhaps go back to using one of the Tk message/simple dialogs....
 
I have just assumed that I am missing some (simple) method call that will solve the problem....
 
Thanks
Peter
-----Original Message-----
From: stewart.midwinter@gmail.com [mailto:stewart.midwinter@gmail.com]On Behalf Of Stewart Midwinter
Sent: Thursday, 15 February 2007 5:08 AM
To: Peter Milliken
Cc: pmw-general@lists.sourceforge.net
Subject: Re: [Pmw-general] How do I get a MessageDialog to come to the top?

Peter, the withdraw() method would hide the dialog.

Still having a problem?




On 2/13/07, Peter Milliken < PeterM@resmed.com.au> wrote:

Hi,

I have written an application where I want a Pmw.MessageDialog to pop up on my screen (running Windows 2000) and be the top level object.

I originally used a tkMessageBox which worked fine but I wanted to customise the event so I used a Pmw MessageDialog instead. Now, for some reason the dialog will not become visible i.e. it is shown but is often under some other application window and therefore I don't see it raised.

The code to raise it looks like this:

self.dialog.show()
self.dialog.activate()

I do a self.dialog.withdraw() immediately after I have created the dialog.

I have searched the list, I have tried some different things but am at a loss as to why this doesn't become the topmost item on my screen when it activates - I didn't have a problem with the tkMessageBox. I (briefly) tried to see whether there was any clues in the tk library stuff about dialogs, tkSimpleDialog etc but couldn't see anything obvious.

Help would be much appreciated :-)

Thanks
Peter

Peter Milliken
Software Engineer
ResMed Ltd
1 Elizabeth Macarthur Drive
Bella Vista NSW 2153 Australia

Tel: +61 2 8884 1000
Dir: +61 2 8884 2316
Fax:+61 2 8884 2006
email:
peterm@resmed.com.au



Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those
materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.

This communication is confidential and may contain legally privileged information.
By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal
privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 8884 1000 Sydney, Australia.




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pmw-general mailing list
Pmw-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmw-general




--
Stewart Midwinter
stewart@midwinter.ca
stewart.midwinter@gmail.com
Skype, GoogleTalk, iChatAV, MSN, Yahoo: midtoad
AIM:midtoad1


Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those
materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.

This communication is confidential and may contain legally privileged information.
By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal
privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 8884 1000 Sydney, Australia.