[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: TableViewer and SWT.CHECK

Well, that is what I use and it is not overwriting the text. Suggestions:
- I am displaying image+text in the 1st column. Could this be a difference?
- I am using a ColumnLabelProvider
- If you don't like the checkbox being shared with the text, why not create an empty first column?
- are you doing any owner draw?


David Huebel wrote:
Derek wrote:

David Huebel wrote:
When I create a TableViewer with SWT.CHECK, the check box renders on top
of
the text in the first column of the table.  (The text is centered, and
the check box appears to be left-justified, so if I enlarge the column,
the check box appears to the left of the text.)

Am I doing something wrong, or is this the "correct" behavior?  Is there
a way to make the check box render in its own column, or do I need to
implement this myself by adding an extra column with a
CheckboxCellEditor?

-David

How about using a CheckboxTableViewer?


CheckboxTableViewer is a convenience wrapper for creating a TableViewer with
SWT.CHECK. I should have used it in the first place instead of using
TableViewer directly, but in any case, it renders the same way, with the
checkbox sharing space with the first element in each row and often being
drawn on top of it.


-David



--
Derek