Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] TreeColumn Labels have to be the same size?

I have changed my old TableViewer to a TreeViewer with TreeColumns. It has a
ITreeContentProvider and an ITableLabelProvider. There are 2 columns, the first
one should only have text, the second one only a very wide image.

Here's the mystery:

If I return a 1258 pixel image for the 2nd column image and a null image for the
first column, the 1st column will resize to be 1258 (there are very short text
labels...).

If I return a 5 pixel wide image for the first column and a 1258 pixel wide
image for the second column I get: a 5 pixel image for the first column and a 5
pixel squashed version of my 1258 pixel image.

Do label images for different columns in a Tree have to be the same size? Is
there another way to display my tree with very large images to the right of
each TreeItem (without squashing either...)? I've found other problems similar
elsewhere on the internet but no one seemed to have an answer.Thanks!

-casey


Back to the top