Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » tableItem.setImage: unable to set different size images after first time?
tableItem.setImage: unable to set different size images after first time? [message #463302] Thu, 03 November 2005 01:46 Go to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 7
Registered: July 2009
Junior Member
We use tableItem.setImage to show programmatically generated images in
cells of a table.

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

Our code works great until a column width is changed.

Our code 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 out 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 one year of SWT experience, I tend to think this is my
mistake. But, I showed this to a coauthor of what a best selling book on
SWT. He independently confirmed this problem and suggested we report it
as a bug.

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.

TIA,
Bill
Re: tableItem.setImage: unable to set different size images after first time? [message #463413 is a reply to message #463302] Fri, 04 November 2005 20:41 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The "original sized pink rectangle" sounds like a bug. When a new image is
set, the old one should no longer draw.

It is a Windows limitation that every image in a table and tree must be the
same size. Is this what you are seeing? Please submit a bug report with
some simple code that shows the problem.

"B Ewing" <bewing@nexusbio.com> wrote in message
news:50e010ef437529999dff3a5e53e6cfc8$1@www.eclipse.org...
> We use tableItem.setImage to show programmatically generated images in
> cells of a table.
>
> These images are dynamically drawn to be use all of the available space in
> the cell.
>
> Our code works great until a column width is changed.
>
> Our code 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 out 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 one year of SWT experience, I tend to think this is my
> mistake. But, I showed this to a coauthor of what a best selling book on
> SWT. He independently confirmed this problem and suggested we report it
> as a bug.
>
> 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.
>
> TIA,
> Bill
>
>
Previous Topic:How to change the image of the checkbox in the checked table
Next Topic:How to add resize listener for CoolBarItem?
Goto Forum:
  


Current Time: Thu Apr 25 15:55:55 GMT 2024

Powered by FUDForum. Page generated in 0.03204 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top