Skip to main content



      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 12:40 Go to next message
Eclipse UserFriend
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 12:42] by Moderator

Re: Avoid Nattable selecting the first char typed in edit mode [message #1790714 is a reply to message #1790706] Thu, 14 June 2018 15:05 Go to previous messageGo to next message
Eclipse UserFriend
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 16:24 Go to previous messageGo to next message
Eclipse UserFriend
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 16:37 Go to previous messageGo to next message
Eclipse UserFriend
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 17:23 Go to previous message
Eclipse UserFriend
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: Sun Jul 13 00:21:55 EDT 2025

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

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

Back to the top