|
|
Re: Multi Edit Caret Location [message #1551048 is a reply to message #1551003] |
Wed, 07 January 2015 11:29 |
ambuj bhargava Messages: 19 Registered: July 2014 |
Junior Member |
|
|
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 130 times)
[Updated on: Wed, 07 January 2015 11:43] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04730 seconds