Tab between fields in TableViewer

前端 未结 5 685
广开言路
广开言路 2020-12-19 10:20

What I\'d like to do is be able to tab between elements in table.

I currently am creating my table like this.

this.tableViewer = 
            new T         


        
5条回答
  •  盖世英雄少女心
    2020-12-19 10:27

    I also had to implement tabbing between elements in a table. We use Grid from Nebula as the table. Firstly, I had to suppress tabbing the focus preventing it from moving out of the table.

    and then I added a Key Listener which moves the focus/selection to the next cell:

    I also made my own algorithm to move the selection one cell to the right and when at the end of the row, move it to the beginning of the next row. When end of table is reached, the selection moves back to the first cell in the table.

    This solved the problem for me.

提交回复
热议问题