StyledText resets caret position, scrolls back up [message #454312] |
Wed, 20 April 2005 03:27  |
Eclipse User |
|
|
|
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 12:17  |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.08321 seconds