|StyledText setCaretOffset not working? [message #467516]
||Wed, 01 February 2006 12:54
Originally posted by: eclipse.insomnia-consulting.org|
I'm writing code that replaces text in a StyledText widget during the
The code that's giving me problems is...
StyledText sv = getSourceViewer().getTextWidget() ;
int offset = sv.getCaretOffset() ;
sv.setSelection(0, offset) ;
ignore = true ; //to ensure the textChanged doesn't get executed a second
sv.insert("//test\nnop|nop |nop|nop|nop\nnop|clracc|") ;
ignore = false ;
I'd expect, at the end of this the caret would be at the beginning of the
text. However, it is always at the original caretOffset position.
Any thoughts? (Eclipse 3.1.1 on Mac OSX 10.4)
Powered by FUDForum
. Page generated in 0.07363 seconds