www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - Location of MessageBox

reply Plumm <sailormoontw gmail.com> writes:
Hi :

   The location of the MessageBox seems to appear in the middle of the screen,
is there any setting to make it right near the cursor?

   Thanks.
Aug 03 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
Plumm schrieb:
 Hi :
 
    The location of the MessageBox seems to appear in the middle of the screen,
is there any setting to make it right near the cursor?
 
    Thanks.
I don't know of such an option in MessageBox. In JFace you can use the dwtx.jface.dialogs.MessageDialog. This class is made for easy extensibility. I haven't tried, but i think you can override the configureShell() methods and set the position. From Display you can get the Display.getCurrent().getCursorLocation() Another good resource to ask this question is probably the SWT newsgroup on the eclipse.org server. (Needs registration) http://www.eclipse.org/newsportal/thread.php?group=eclipse.platform.swt
Aug 03 2008