[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: problem with different size images in table widget item

Tom,

Yes, I'm pretty sure you are right. Based on what I remember, the first icon that's displayed ends up setting the expectation that all other icons will be of exactly that size.


Tom Schindl wrote:
Hi,

may I suggest using Nebula-Grid and you can resize the height of columns
using a listeners if I remember correctly all rows in your table must
have the same height but I could be wrong.

Maybe also custom-draw might be interesting to you.

http://www.eclipse.org/articles/Article-CustomDrawingTableAndTreeItems/customDraw.htm
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet231.java


Tom

Neelesh Thakur schrieb:
Hi
I am working on Table widget which have some columns of different width.
Of these columns I want to display images in two columns [suppose A and
B], and repeat the things for multiple rows. Size of the images are
different. I am calculating the maximum width of image and setting up
the width of column according to the maximum width of image from image
array for that column, so A and B can have different width according to
images. These image also different heights.

Now when I display table; images do not come with orignal sizes only the
first row and first image are in orignal size [cosidering in first row
second image size is greater than first image] and others are shrinked
according to size of this image width and height. So even though I have
set up the width of the two columns different still the image will
appear in  the same size so as to first image in first row. These things
are replicated in each row making it very odd to look like. Since
TableColumn and TableItem do not have height property I cannot manually
adjust the size of any of the table's cell.
Question: How can have control over the individual cell  in Table widget
so that I set up height and width with respect to each image.

Any pointers to any help file will be very useful.

Please let me know how to proceed for this problem.

Thanks
Neelesh