| [news.eclipse.platform.swt] Re: Caret on beginning of selection |
Hi Pavel,
I faced the same problem and did not find a clean solution. I did the hack of subclassing the widget (StyledText in my case) and introduced a new method that does not reset the selection when setting the caret offset.
This solution is clearly discouraged - but works for me.
Peter
Pavel Halas wrote:
Hi all,
is there a chance in SWT Text widget to programmaticaly set a selection with a caret to be on the beginning of the selection?
Example: some|TEXT
- "some" is a not selected part of the text in Text widget - "|" is a caret position - "TEXT" is a selected part of the text in Text widget
For better understanding, it's about autocomplete functionality.
Thanks for suggestions, Pavel Halas