Menu

Copy part of SQL result to clipboard

2006-09-05
2013-04-29
  • zheng xi long

    zheng xi long - 2006-09-05

    Just found I could copy all the SQL result into clipboard with the context menu. While it's quite common for me to copy part of the SQL result into clipboard. E.g., there are 10 rows returned from a SQL statement, I just want to copy rows start from line 2 to line 5, Or I just want to copy column 1 to column 3 among the total 20 columns.

    I looked into the code and found we are using the Table widget with option MULTI.

    But I could not select more than one cell at the same time. Would you please help to indicate what's missed by me?

    final TableViewer tableViewer = new TableViewer(composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.VIRTUAL);

     
    • Davy Vanherbergen

      That was my original goal.  Unfortunately, the SWT table widget doesn't support selecting multiple columns/cells.

      It might be possible to select multiple rows, but I'll have to check if this doesn't interfere with the TableCursor (which allows you to use the keyboard to navigate the table).

       

Log in to post a comment.