Skip to main content

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


This seems to be a JFace viewer/provider question, which should be asked on the platform newsgroup: news://news.eclipse.org/eclipse.platform
(To request a password: http://dev.eclipse.org/newsManager/newsRequestForm.html)

Here in SWT, we use TreeColumn.pack() and/or TreeColumn.setWidth(int) to get the widths we want for tree columns.

Carolyn



Casey A Dugan <caseyd@xxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

11/03/2005 03:54 PM

Please respond to
"Eclipse Platform SWT component developers list."

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[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
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top