Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » StyledText resets caret position, scrolls back up
StyledText resets caret position, scrolls back up [message #454312] Wed, 20 April 2005 07:27 Go to next message
Stephan Brosinski is currently offline Stephan BrosinskiFriend
Messages: 2
Registered: July 2009
Junior Member
I made a plugin contaning 2 multiline StyledText widgets, both have a
vertical scrollbar. I enter or view a large text so the scrollbar has to
move down. Now when the StyledText looses focus, it jumps back to line 0.
When it gains focus again, the caret is positioned in the topleft corner.
This makes it really irritating to edit long text. If I look at other
multiline widgets within Eclipse this does not happen, so what could I be
doing wrong?
I tried to implement a focus listener to save the current caret position
before the StyledText looses focus, and then reset it as soon as it gains
it. But this doesn't work. When focusLost is called I already get 0 as the
caret position, even though it clearly wasn't 0 when the control lost
focus. I checked in Eclipse 2.1, 3.0 and 3.1 M5/M6. The problem is the
same.
Re: StyledText resets caret position, scrolls back up [message #454333 is a reply to message #454312] Wed, 20 April 2005 16:17 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
This sounds like a bug. Please enter a bug report with a stand alone
snippet that shows the problem. Thanks!

"Stephan Brosinski" <sbrosinski@gmail.com> wrote in message
news:c9715eb70a2d6f741c423591250ca9da$1@www.eclipse.org...
> I made a plugin contaning 2 multiline StyledText widgets, both have a
> vertical scrollbar. I enter or view a large text so the scrollbar has to
> move down. Now when the StyledText looses focus, it jumps back to line 0.
> When it gains focus again, the caret is positioned in the topleft corner.
> This makes it really irritating to edit long text. If I look at other
> multiline widgets within Eclipse this does not happen, so what could I be
> doing wrong?
> I tried to implement a focus listener to save the current caret position
> before the StyledText looses focus, and then reset it as soon as it gains
> it. But this doesn't work. When focusLost is called I already get 0 as the
> caret position, even though it clearly wasn't 0 when the control lost
> focus. I checked in Eclipse 2.1, 3.0 and 3.1 M5/M6. The problem is the
> same.
>
Previous Topic:SWT Browser mousehandling
Next Topic:Virtual Table Sorting is going into an infinite loop
Goto Forum:
  


Current Time: Fri Apr 26 16:20:43 GMT 2024

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

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

Back to the top