Multi Edit Caret Location [message #1550996] |
Wed, 07 January 2015 05:46  |
Eclipse User |
|
|
|
Hi
Multi Edit Dialog Box that opens on F2 button presing has caret location in the middle.
Is there a way to bring it on left of the dialog.
Regards
Ambuj
|
|
|
|
Re: Multi Edit Caret Location [message #1551048 is a reply to message #1551003] |
Wed, 07 January 2015 06:29   |
Eclipse User |
|
|
|
Hi Dirk
Thanks for the prompt reply.
.DIALOG_SHELL_LOCATION will specify the location of the Multi Edit Dialog
What I need is the location of the cursor inside the dialog, so that when ever the user enters the value it must begin from left not from the center
I guess you were talking about the below code
//configure custom dialog settings
Display display = Display.getCurrent();
Map editDialogSettings = new HashMap();
editDialogSettings.put(CellEditDialog.DIALOG_SHELL_TITLE, "My custom value");
editDialogSettings.put(CellEditDialog.DIALOG_SHELL_ICON, display.getSystemImage(SWT.ICON_WARNING));
editDialogSettings.put(CellEditDialog.DIALOG_SHELL_RESIZABLE, Boolean.TRUE);
Point size = new Point(400, 300);
editDialogSettings.put(CellEditDialog.DIALOG_SHELL_SIZE, size);
int screenWidth = display.getBounds().width;
int screenHeight = display.getBounds().height;
Point location = new Point((screenWidth / (2 * display.getMonitors ().length)) - (size.x/2), (screenHeight / 2) - (size.y/2));
editDialogSettings.put(CellEditDialog.DIALOG_SHELL_LOCATION, location);
Can you please suggest.
ATTACHING THE SCREEN SHOT
Regards
Ambuj
Attachment: image5.jpg
(Size: 339.01KB, Downloaded 147 times)
[Updated on: Wed, 07 January 2015 06:43] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05808 seconds