[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Closing a Modal MessageBox in code

Fair enough, I guess if I used my own dialog box instead of the common
windows one I would be able to do this (block on my own dispatch loop and
then dispose the shell, if needed). The main reason I ask this is because
I have seen strange behaviour (you can click on neither) when two modal
dialog boxes are displayed on the screen at the same time...

Thanks

Steve Northover wrote:

> There is no API and I'm not even sure it's possible on Windows (no Windows
> API either).  When you put up a MessageBox, you run a message loop in the
> operating system.  How would you call dispose()?

> "Vadalus" <vadalus@xxxxxxxxx> wrote in message
> news:bf13u5$qma$1@xxxxxxxxxxxxxx
> > HI all,
> >
> > Can anyone tell me whether it is possible to close a modal messagebox
> > (org.eclipse.swt.widgets.MessageBox) from code? I need to be able to close
> > down an open modal dialog box in some circumstance in my code (when
> > shutting down for example, or a new condition arises which is more
> > important than the message in the modal dialog). I could convert this to
> > use a modless dialog box but I do need the behaviour of a modal dialog
> > 99.9% of the time.
> >
> > I checked the obvious like 'dispose()' but no much method exists.
> >
> > Thanks
> >
> >