Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT, Provider => getColumnImage, Indent in wrong column.  RSS feed

 
Daniel Eson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if I have stumbled onto a bug or if I'm somehow using the provider incorrectly.

I have a provider for a TableViewer in which I'm specifying column #7 should contain an image. The strange thing is that the text shown in the first column (#0) of that row is indented with with just as much space as the image is using in the 7th column.

public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == 7) {
return ResourceManager.getImage
(CompositeClass.class, "/gfx/Ikon_A.gif");
}
return null;
}

Does anybody know if there is a workaround ?

regards
Daniel
 
Daniel Eson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI

Bug #43910 at Bugzilla

With a simple workaround :

As the bug seems to affect only the first column, a simple solution would be to not use the first column at all. Simply set the column width for the first column to 0 and setResizable to false.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!