Bug 270743 - Dialog location should be modifiable
Summary: Dialog location should be modifiable
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-01 06:44 EDT by Christopher Deckers CLA
Modified: 2019-09-06 16:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Deckers CLA 2009-04-01 06:44:38 EDT
Sometimes it is desirable that a dialog appears at a particular location, and I have not found any such API.

There are 2 scenarios:
1. center around a given location.
2. With its top left corner at a particular location, provided we have a way to know the size of the dialog.

I guess the real size of a dialog is only known when the dialog is shown and depends on some settings that may be set before calling the various open() methods.
I thus suggest the possibility to set a location strategy on the dialog:
Dialog.setLocationStrategy(DialogLocationStrategy);
where DialogLocationStrategy is an interface with a method:
Point getLocation(Rectangle defaultBounds);
This method would be invoked by that dialog just befor actually showing, to adjust its location.
Comment 1 Felipe Heidrich CLA 2009-04-03 16:55:53 EDT
Win32 doesn't provide API to set the location for its dialogs.

Steve to determine if it is possible to implement our own set location function using a window hook or some other technique.
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:05:59 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.