Results 1 to 5 of 5
  1. #1
    Bill Ewing is offline Member
    Join Date
    Dec 2010
    Location
    Encinitas, CA
    Posts
    7
    Rep Power
    0

    Default How to get cell selection to work right in table?

    We have a JFace table with combo box cell editors in it. It works fine except for these issues:

    1. Only the first cell is highlighted when it is clicked on.

    2. To edit a cell in the second column of a row, we must first click on the cell in the first column of that row.

    Any ideas why this is happening?

  2. #2
    JDP
    JDP is offline Member
    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Default

    Are you missing the SWT.FULL_SELECTION constant??

    Jim

  3. #3
    Bill Ewing is offline Member
    Join Date
    Dec 2010
    Location
    Encinitas, CA
    Posts
    7
    Rep Power
    0

    Default

    Thanks for the help, JDP.

    Yes, the SWT.FULL_SELECTION constant is not there.

    When I include it, nothing works. It does make the entire line highlighted when selected, but none of the cell editors come up.

  4. #4
    JDP
    JDP is offline Member
    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Default

    OK - we had the same bug, having to click the first column cell to edit another column, and adding SWT.FULL_SELECTION to the viewer corrected that for me.

    To provide more information: I established editing in the column I needed it using column.setEditingSupport.

    Jim

  5. #5
    Bill Ewing is offline Member
    Join Date
    Dec 2010
    Location
    Encinitas, CA
    Posts
    7
    Rep Power
    0

    Default

    Thanks Jim for your help.
    I know I'm doing something wrong, but am stuck. I agree that I need SWT.FULL_SELECTION as I've seen it in various sample code.
    And yes, I am using setEditingSupport to do combobox editors. Works great, but....

    To review:
    -Adding SWT.FULL_SELECTION makes everything NOT work for me.
    -What SWT.FULL_SELECTION messes up is it causes cell editors to not come up.
    -If I take SWT.FULL_SELECTION out, I can edit individual cells, but only after first clicking in the leftmost cell in that row. And only the leftmost cell gets highlighted.

Similar Threads

  1. Table selection listener
    By leda in forum SWT / JFace
    Replies: 1
    Last Post: 01-16-2011, 10:35 AM
  2. Cell selection not working in JTable
    By pahiker in forum AWT / Swing
    Replies: 9
    Last Post: 07-10-2010, 07:01 PM
  3. If on cell of table
    By Tovam in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 05-18-2010, 09:34 AM
  4. Replies: 1
    Last Post: 01-08-2010, 07:19 AM
  5. table selection in SWT/Jface
    By amine2610 in forum SWT / JFace
    Replies: 1
    Last Post: 04-15-2009, 09:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •