Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Caret on beginning of selection
Caret on beginning of selection [message #462967] Mon, 24 October 2005 08:04 Go to next message
Pavel Halas is currently offline Pavel HalasFriend
Messages: 2
Registered: July 2009
Junior Member
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
Re: Caret on beginning of selection [message #462982 is a reply to message #462967] Mon, 24 October 2005 19:28 Go to previous messageGo to next message
Peter Kliem is currently offline Peter KliemFriend
Messages: 35
Registered: July 2009
Member
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
>
Re: Caret on beginning of selection [message #462989 is a reply to message #462982] Tue, 25 October 2005 07:14 Go to previous messageGo to next message
Stefan Langer is currently offline Stefan LangerFriend
Messages: 236
Registered: July 2009
Senior Member
Open a feature request for it and tell us the bug number so people can
vote on it.

Peter Kliem wrote:
> 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
>>
Re: Caret on beginning of selection [message #463040 is a reply to message #462967] Tue, 25 October 2005 14:37 Go to previous messageGo to next message
Pavel Halas is currently offline Pavel HalasFriend
Messages: 2
Registered: July 2009
Junior Member
If you need such functionality, vote for the bug #113664.
Re: Caret on beginning of selection [message #463043 is a reply to message #463040] Tue, 25 October 2005 16:56 Go to previous message
Gail Jakubowski is currently offline Gail JakubowskiFriend
Messages: 36
Registered: July 2009
Member
I requested similar functionality for StyledText, bug #113354.

"Pavel Halas" <peeman@post.cz> wrote in message
news:4b20742218a795244b5083798d82d501$1@www.eclipse.org...
> If you need such functionality, vote for the bug #113664.
>
Previous Topic:swt browser - applet
Next Topic:Does browser rendering occur in the Display thread?
Goto Forum:
  


Current Time: Sat Apr 27 04:01:04 GMT 2024

Powered by FUDForum. Page generated in 0.03157 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top