[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: gap in leftmost column background color
|
This looks like a bug so I've logged
https://bugs.eclipse.org/bugs/show_bug.cgi?id=224954 . Unfortunately I
can't think of a workaround to suggest here, other than to hide the bug by
giving all of your items a column 0 image so that the gap in the background
colour looks intentional (for the image).
Grant
"Chad Showalter" <cshowalter@xxxxxxxxxxxxx> wrote in message
news:350637de6debf4879bda1808ef150d89$1@xxxxxxxxxxxxxxxxxx
> I have a TableViewer with a LabelProvider that implements
> ITableLabelProvider and ITableColorProvider. I use different background
> colors based on the data in a given row of the table. Recently I realized
> that it should be relatively easy for me to include drag/drop
> functionality to allow a user to reorder the columns in my table (I'm
> using Eclipse 3.2).
>
> I added the following code:
>
> Listener listener = new Listener() {
> public void handleEvent(Event e) {
> //System.out.println("Move "+e.widget);
>
> }
> };
> TableColumn[] columns = table.getColumns();
> for (int i = 0; i < columns.length; i++)
> {
> columns[i].setMoveable(true);
> columns[i].addListener(SWT.Move, listener);
> }
>
> Everything works fine -- except that when I move the leftmost column, I
> notice that the background color for this column doesn't extend the full
> width of the cell. There is a multiple pixel wide gap on the left edge of
> the column. This isn't obvious when the column is parked on the left;
> however it's very obvious when the leftmost column is moved anywhere else,
> with a column to the left of it (the background color isn't continuous
> between the adjoining cells). Refreshing the viewer or sorting doesn't
> change anything.
>
> Any help would be appreciated.
>
> Thanks,
> Chad
>
>