Community
Participate
Working Groups
HEAD Text#getCaretLocation() is not implemented for SINGLE style Texts. It always returns {0, 0}. Furthermore, the Javadoc of the method doesn't make sense. It should tell that the location is relative to this Text.
Silenio, do you know if this be fixed ? maybe Lakshmi can investigate this...
I fixed the doc http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=33702c0f14302d7231ea3f607b86a900e03829aa Thank you for pointing that out, it has being wrong for ages. It looks like someone copied the javadoc from Control#getLocation() but didn't change the text propertly...
George is fixing bug#44072. He will fix this one too.
(In reply to comment #3) > George is fixing bug#44072. He will fix this one too. The fix is included in the patch for Bug 44072.
Just downloaded this week's 4.2 Stream Maintenance build. It's not fixed. But a TODO note has been added to fix. Please SWT wizards - this deficiency is holding up my project. While you are at it, the corresponding setCaretLocation is missing. You can get the equivalent in StyledText with setCaretOffset(getCaretOffset(point)). But there's no way to set the caret location for Text.
(In reply to comment #5) > Just downloaded this week's 4.2 Stream Maintenance build. It's not fixed. But a > TODO note has been added to fix. > > Please SWT wizards - this deficiency is holding up my project. > > While you are at it, the corresponding setCaretLocation is missing. You can get > the equivalent in StyledText with setCaretOffset(getCaretOffset(point)). But > there's no way to set the caret location for Text. Whoops that should be getOffsetAtLocation(point).
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. If the bug is still relevant, please remove the "stalebug" whiteboard tag.