Bug 361598

Summary: Text - there's no way to set caret (x,y) location
Product: [Eclipse Project] Platform Reporter: Doug M <eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: lshanmug
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Doug M CLA 2011-10-20 19:07:44 EDT
Build Identifier: swt-3.7-cocoa-macosx-x86_64

There is no method for setting the caret to a specific spacial location. This function is needed, for example, when moving from one Text area to another using up and down arrows.

The caret location can be queried with getCaretLocation.

With StyledText, the caret location can be set with setCaretOffset(getOffsetAtLocation(point)).

Posting a left button mousedown/up at the desired location only causes the Text area to flicker, and does not set the caret.

Reproducible: Always