Bug 361598 - Text - there's no way to set caret (x,y) location
Summary: Text - there's no way to set caret (x,y) location
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 19:07 EDT by Doug M CLA
Modified: 2019-03-06 06:23 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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