2 Replies Latest reply: Oct 15, 2012 3:04 PM by Jörg RSS

    Table editing

    Jörg
      Hello,

      you can move around in an editable table from cell to cell using the (Shift) TAB,
      ENTER or ARROW keys. Whenever a cell has got the focus, you can right away start
      typing some input. Pressing an ARROW key then terminates the input and moves the
      focus to an adjoining cell according to the ARROW key's direction - provided the cell is
      not at the border of the table.
          Another way to select a cell for input is by double clicking. Then the LEFT and
      RIGHT ARROW keys don't terminate input any more, but move the cursor within the
      cell. Are these two distinct editing modes and can they be detected/selected?

      The circumstances which lead me to this question are that I have written a
      custom editor which only works if I double click the cell first, thus giving the
      impression that the custom editor is not launched when I start input after
      entering a cell by means of a key or single click.
      If helpful I can provide sample code.

      Greetings

      J.
        • 1. Re: Table editing
          800268
          Does this describe you problem: http://jroller.com/page/santhosh?entry=keyboard_handling_in_tablecelleditor
          • 2. Re: Table editing
            Jörg
            Thank you, Walter. Yes, this link was promising. But I couldn't get it work with key bindings.
            So I again started searching the net. And this time I found an old post of Kleopatra with an untopable one line solution:
            myTable.setSurrendersFocusOnKeystroke(true);
            So all my thanks to Jeanette, too.

            Bye