SWT event returns wrong coordinates in bidi mode [message #468285] |
Tue, 04 August 2009 20:48 |
Florence Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hello,
We have a pop up widget which runs correctly in the LTR mode. However,
when it is displayed in the RTL mode, the popup position is located far
away from the mouse cursor. The space between the cursor and the pop up
widget is the width of the widget. In our code, we did put in
SWT.RIGHT_TO_LEFT in the style when creating the shell.
Note, the text is rendered correctly on this widget though. All the text
is aligned to the right.
The same issue also happens when I drag this widget. From my debug
statement, I can see the coordinates returned from MouseEvent (event.x and
event.y) are incorrect. For example, if the widget width is 300 and I
clicked on the upper left corner of the widget, the event.x returns as 300
instead of 0. When I clicked on the upper right corner of the widget, the
event.x returns as 0.
Is this a known issue or it is the way it is supposed to work?
Should we handle the bidi case like this ourselves? I thought SWT API
handles this already.
Thanks
Florence
|
|
|
Re: SWT event returns wrong coordinates in bidi mode [message #482177 is a reply to message #468285] |
Tue, 25 August 2009 15:08 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Hi Florence, sorry for the late reply,
It sounds like it could be an swt bug, so please log a report at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT
and provide a snippet (ideal template:
http://www.eclipse.org/swt/faq.php#whatisasnippet ) that shows the problem
happening.
Thanks!
Grant
"Florence " <florencelu@yahoo.com> wrote in message
news:453caa786050e82ede805c217d9b563d$1@www.eclipse.org...
> Hello,
>
> We have a pop up widget which runs correctly in the LTR mode. However,
> when it is displayed in the RTL mode, the popup position is located far
> away from the mouse cursor. The space between the cursor and the pop up
> widget is the width of the widget. In our code, we did put in
> SWT.RIGHT_TO_LEFT in the style when creating the shell.
>
> Note, the text is rendered correctly on this widget though. All the text
> is aligned to the right.
>
> The same issue also happens when I drag this widget. From my debug
> statement, I can see the coordinates returned from MouseEvent (event.x and
> event.y) are incorrect. For example, if the widget width is 300 and I
> clicked on the upper left corner of the widget, the event.x returns as 300
> instead of 0. When I clicked on the upper right corner of the widget, the
> event.x returns as 0.
>
> Is this a known issue or it is the way it is supposed to work?
>
> Should we handle the bidi case like this ourselves? I thought SWT API
> handles this already.
>
> Thanks
> Florence
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02985 seconds