Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Avoid Nattable selecting the first char typed in edit mode
Avoid Nattable selecting the first char typed in edit mode [message #1790706] Thu, 14 June 2018 16:40 Go to next message
Santhosh Kumar is currently offline Santhosh KumarFriend
Messages: 44
Registered: March 2011
Member
When focus into a cell to edit its contents (by typing first char in normal mode), Nattable clears the old value, sets the new char typed and it selects that new char. So when user types another char, the previous char gets overwritten.

May be easier to see with the attached gif. In the example gif, I'm trying to enter 123 in first cell and 456 in second cell. As you can see, when I type 1, it inputs that but selects it. So when I type 2, 1 gets overwritten.

Any idea how to configure such that it doesn't select the first typed char so that user can start typing in a cell without missing first char?

[Updated on: Thu, 14 June 2018 16:42]

Report message to a moderator

Re: Avoid Nattable selecting the first char typed in edit mode [message #1790714 is a reply to message #1790706] Thu, 14 June 2018 19:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Which version of NatTable on which platform? I do not see this behavior on Windows with the latest SNAPSHOT. The behavior is to set the selection at the end of the inserted text, which is the typed character in the described case.
Re: Avoid Nattable selecting the first char typed in edit mode [message #1790715 is a reply to message #1790714] Thu, 14 June 2018 20:24 Go to previous messageGo to next message
Santhosh Kumar is currently offline Santhosh KumarFriend
Messages: 44
Registered: March 2011
Member
This is in Mac High Sierral version 10.13.4 with Nattable 1.5.

Anyways we can disable the behavior to not to select after inserted text?
Re: Avoid Nattable selecting the first char typed in edit mode [message #1790716 is a reply to message #1790715] Thu, 14 June 2018 20:37 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
As I said, there is no selection for me. The caret needs to be placed at the end of the text that is added to the text control. This is done via Text#setSelection(textLength, textLenght). I suppose a bug in SWT on Mac here. Not performing this will place the caret at the beginning which is an even more distracting behavior.
Re: Avoid Nattable selecting the first char typed in edit mode [message #1790719 is a reply to message #1790716] Thu, 14 June 2018 21:23 Go to previous message
Santhosh Kumar is currently offline Santhosh KumarFriend
Messages: 44
Registered: March 2011
Member
Thank you Dirk. I will experiment and see if we can find some workaround and update.
Previous Topic:Filtering clarifications
Next Topic:Problem using SortColumnCommand on a table with a CompositeFreezeLayer
Goto Forum:
  


Current Time: Thu Apr 18 04:27:23 GMT 2024

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

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

Back to the top