Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Cursor position in a Text Widget being re-set
Cursor position in a Text Widget being re-set [message #436899] Wed, 26 May 2004 00:18 Go to next message
Saurabh Bagrodia is currently offline Saurabh BagrodiaFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I have a composite with form layout and have a few widgets on it including
a ccombo (editable), a text and a styled text. Also I have added selection
and focus out listener to the ccombo.

Now when I select the text in the ccombo and then try to select the text
in the text widget or the styledtext widget instead of getting the cursor
to show at the character in the text that I selected (by a left click) the
cursor is resetted to the start of the text. This is not the usual
behaviour. I expected the cursor to show up at the position of the
character that I select. Howerver now if I do not add the focus out
listener to the ccombo and then try to repeat the steps I get the expected
result.

Hence I was puzzled as to why adding focus out listener to ccombo widget
re-sets the cursor position of the text/styledtext widget to the start of
the text??
Re: Cursor position in a Text Widget being re-set [message #436946 is a reply to message #436899] Wed, 26 May 2004 13:57 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Sounds like an SWT bug. Enter a problem report with a stand alone snippet.
Thanks.

"Saurabh Bagrodia" <bagrodia@ca.ibm.com> wrote in message
news:c90np6$85v$1@eclipse.org...
> Hi,
>
> I have a composite with form layout and have a few widgets on it including
> a ccombo (editable), a text and a styled text. Also I have added selection
> and focus out listener to the ccombo.
>
> Now when I select the text in the ccombo and then try to select the text
> in the text widget or the styledtext widget instead of getting the cursor
> to show at the character in the text that I selected (by a left click) the
> cursor is resetted to the start of the text. This is not the usual
> behaviour. I expected the cursor to show up at the position of the
> character that I select. Howerver now if I do not add the focus out
> listener to the ccombo and then try to repeat the steps I get the expected
> result.
>
> Hence I was puzzled as to why adding focus out listener to ccombo widget
> re-sets the cursor position of the text/styledtext widget to the start of
> the text??
>
Previous Topic:StackOverflow error in tree viewer
Next Topic:Select events not generated on Mac - 3.0M9
Goto Forum:
  


Current Time: Tue Apr 23 09:00:51 GMT 2024

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

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

Back to the top