Is there a bug in TableItem.setImage?

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Is there a bug in TableItem.setImage?

Postby Slot Head » Thu Nov 03, 2005 9:32 am

We use tableItem.setImage to show programmatically generated images in cells of a table.

These images are dynamically drawn to use all of the available space in the cell.

Our code works great until a column width is changed. It detects this and regenerates the images accordingly to fit.

PROBLEM: it is as if you cannot change the size of the original images. Any new images appear only in the area occupied by the orginal images.

For example, suppose our image is a pink rectangle that fills a cell. After broadening the column, what we see is the original sized pink rectangle to the left and background color to the right of it. We are quite sure our code generated a wider image.

For more interesting images it appears that they are getting stretched or shrunk to fit the orginal image's size.

Having only about one year of SWT experience, I tend to think this is my mistake. But, I showed this to a coauthor of a best selling book on SWT. He independently confirmed this problem and suggested I report it as a bug. Sadly, no responses from

I would be happy to boil this down to a concise demo app and send it in if there is interest in studying this.

If anyone is using tableItem.setImage and is not having this problem, we would appreciate hearing about it.
Slot Head
Posts: 36
Joined: Sun Jul 10, 2005 9:50 am

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest